Open
Bug 1028895
Opened 11 years ago
Updated 2 years ago
Mouseover triggered in mochitest-browser & dt according to position of mouse cursor on test box
Categories
(Testing :: Mochitest, defect)
Testing
Mochitest
Tracking
(Not tracked)
NEW
People
(Reporter: miker, Unassigned, Mentored)
References
(Depends on 1 open bug)
Details
(Keywords: good-first-bug, Whiteboard: [lang=js])
Attachments
(1 file)
22.30 KB,
patch
|
Details | Diff | Splinter Review |
I have mochitests failing because the mouse pointer on test machines is triggering mouseover events and breaking tests.
I am sure that we only recognised synthesized mouse events in tests. Has this changed recently?
If we can receive mouseover events from random places in the UI depending on where the test box mouse cursor is it will obviously break stuff.
STR:
1. Apply the attached patch to a copy of fx-team.
2. ./mach build
3. Run the test using:
./mach mochitest-devtools browser/devtools/layoutview/test/browser_layoutview_guides.js
4. Move the mouse so that it is over where the padding region of the layout view will be when the test runs.
5. Run the test again.
Extra mouseover events will be triggered and the test will fail, at least for me on OSX Mavericks and on Windows test servers.
Native mouse events really should be disabled on test servers and only synthesized events should be allowed.
Reporter | ||
Comment 1•11 years ago
|
||
This is the code that triggers the issue:
/Users/mratcliffe/Desktop/fx-team/browser/devtools/layoutview/view.js
elt.addEventListener("mouseover", onmouseover, true);
let onmouseover = function(e) {
let region = e.target.getAttribute("data-box");
this.layoutview.showBoxModel({region: region});
return false;
}.bind(window);
showBoxModel: function(options={}) {
let toolbox = this.inspector.toolbox;
let nodeFront = this.inspector.selection.nodeFront;
dump("\n\nview.js showing box model with " + options.toSource() + "\n\n");
toolbox.highlighterUtils.highlightNodeFront(nodeFront, options);
},
Even though synthesizeMouse has not been called and the only place this can be triggered is when mousing over the layout view's padding div it is triggered when the test first runs:
04:17:45 INFO - view.js showing box model with ({region:"padding"})
04:17:45 INFO - view.js showing box model with ({region:"padding"})
04:17:45 INFO - view.js showing box model with ({region:"padding"})
04:17:45 INFO - view.js showing box model with ({region:"padding"})
We need to somehow be smart about blocking native mouse events.
Reporter | ||
Comment 2•11 years ago
|
||
All of our tests should block mouse events using:
EventUtils.disableNonTestMouseEvents(true)
When bug 1029451 is fixed (it currently blocks synthetic mouseover) we should add it to our head.js files.
Assignee: nobody → mratcliffe
Reporter | ||
Updated•10 years ago
|
Assignee: mratcliffe → nobody
Mentor: mratcliffe
Whiteboard: [good first bug][lang=js]
Assignee | ||
Updated•7 years ago
|
Component: Mochitest Chrome → Mochitest
Updated•5 years ago
|
Keywords: good-first-bug
Whiteboard: [good first bug][lang=js] → [lang=js]
Updated•2 years ago
|
Severity: normal → S3
Hi, I am an Outreachy applicant interested in fixing this bug. I wish to take up this issue... could you pls guide me?
Comment 5•2 years ago
|
||
Hello, As an outreachy applicant, am I eligible to contribute to this bug
You need to log in
before you can comment on or make changes to this bug.
Description
•