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)

All
Windows 8.1
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: mbrubeck, Assigned: mbrubeck)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch (obsolete) — 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)
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
Attachment #711792 - Flags: review?(tabraldes) → review-
(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.
Attached patch patch v2 (obsolete) — Splinter Review
Implements the idea from comment 2.
Attachment #711792 - Attachment is obsolete: true
Attachment #711971 - Flags: review?(tabraldes)
Attached patch patch v3Splinter Review
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 on attachment 711971 [details] [diff] [review] patch v2 Review of attachment 711971 [details] [diff] [review]: ----------------------------------------------------------------- This looks great!
Attachment #711971 - Flags: review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Attachment #711974 - Flags: review?(tabraldes) → review+
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: