Closed
Bug 839460
Opened 12 years ago
Closed 12 years ago
timeout in browser/metro/base/tests/browser_plugin_input_mouse.js with "Switch primary and secondary buttons" enabled
Categories
(Firefox for Metro Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mbrubeck, Assigned: mbrubeck)
References
Details
Attachments
(1 file, 2 obsolete files)
3.34 KB,
patch
|
mbrubeck
:
review+
|
Details | Diff | Splinter Review |
browser_plugin_input_mouse always times out on my laptop, and finally I figured out it was because I swapped my mouse buttons in the Mouse control panel (since I mouse with my left hand), but the test was always synthesizing events from the *physical* left button.
Switching to EventUtils.synthesizeMouse fixes the test for me; is it still testing the right thing or do we really require synthesizeNativeMouse?
Attachment #711792 -
Flags: review?(tabraldes)
Comment 1•12 years ago
|
||
The point of browser_plugin_input_mouse.js is to test whether the metro widget code is correctly forwarding mouse input to plugins. I'm surprised that EventUtils.synthesizeMouse is causing the test to pass since I don't see any code in that path that forwards input to the plugin. Regardless, using EventUtils.synthesizeMouse doesn't test the code path that we are trying to test with browser_plugin_input_mouse.js
I would consider modifying MetroWidget::SynthesizeNativeMouseEvent [1] to check whether "switch primary and secondary buttons" is enabled and switch the input if so. The only issue there is that we may reasonably want to test whether our code handles that setting correctly, and we won't be able to write such tests if our function for synthesizing mouse events takes the setting into account.
[1] https://mxr.mozilla.org/projects-central/source/elm/widget/windows/winrt/MetroWidget.cpp#541
Assignee | ||
Updated•12 years ago
|
Attachment #711792 -
Flags: review?(tabraldes) → review-
Assignee | ||
Comment 2•12 years ago
|
||
(In reply to Tim Abraldes (:tabraldes) from comment #1)
> I would consider modifying MetroWidget::SynthesizeNativeMouseEvent [1] to
> check whether "switch primary and secondary buttons" is enabled and switch
> the input if so. The only issue there is that we may reasonably want to
> test whether our code handles that setting correctly, and we won't be able
> to write such tests if our function for synthesizing mouse events takes the
> setting into account.
Perhaps at the start of this test we should do "BOOL origValue = SwapMouseButtons(false)", and then restore the original value at the end of the test.
Assignee | ||
Comment 3•12 years ago
|
||
Implements the idea from comment 2.
Attachment #711792 -
Attachment is obsolete: true
Attachment #711971 -
Flags: review?(tabraldes)
Assignee | ||
Comment 4•12 years ago
|
||
Sorry, just adding a comment and shuffling some lines around.
Attachment #711971 -
Attachment is obsolete: true
Attachment #711971 -
Flags: review?(tabraldes)
Attachment #711974 -
Flags: review?(tabraldes)
Comment 5•12 years ago
|
||
Comment on attachment 711971 [details] [diff] [review]
patch v2
Review of attachment 711971 [details] [diff] [review]:
-----------------------------------------------------------------
This looks great!
Attachment #711971 -
Flags: review+
Assignee | ||
Comment 6•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Assignee | ||
Updated•12 years ago
|
Attachment #711974 -
Flags: review?(tabraldes) → review+
Updated•10 years ago
|
OS: Windows 8 Metro → Windows 8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•