Closed
Bug 1335888
Opened 8 years ago
Closed 8 years ago
layout/generic/test/test_selection_preventDefault.html | The contents of input aren't selected (input-input-mouseup): Selected String: ""
Categories
(Core :: Layout, defect)
Core
Layout
Tracking
()
RESOLVED
FIXED
mozilla54
Tracking | Status | |
---|---|---|
firefox54 | --- | fixed |
People
(Reporter: jmaher, Assigned: schien)
References
Details
Attachments
(1 file)
we are trying to update our linux images from ubuntu 12.04 to 16.04, with this comes some test failures, specifically:
layout/generic/test/test_selection_preventDefault.html | The contents of input aren't selected (input-input-mouseup): Selected String: ""
you an see this failure on mochitest-8 (happens in both e10s/non-e10s opt/debug/asan):
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5ac0bd83bb7cd8ba2ecad1571c4d2038d8a70ba4&filter-searchStr=mochitest-e10s-8&selectedJob=73651667
here is the full log clip from debug config:
[task 2017-02-01T20:36:38.999775Z] 20:36:38 INFO - TEST-START | layout/generic/test/test_selection_preventDefault.html
[task 2017-02-01T20:36:39.158410Z] 20:36:39 INFO - ++DOMWINDOW == 31 (0x7f018b3bb800) [pid = 2990] [serial = 227] [outer = 0x7f01957efc00]
[task 2017-02-01T20:36:39.452414Z] 20:36:39 INFO - Not taking screenshot here: see the one that was previously logged
[task 2017-02-01T20:36:39.457037Z] 20:36:39 INFO - Buffered messages logged at 20:36:39
[task 2017-02-01T20:36:39.459103Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of fixedDiv1 are selected (fixedDiv1-fixedDiv1-mousedown): Selected String: ""
[task 2017-02-01T20:36:39.461094Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input (checking on parent) are selected (fixedDiv1-fixedDiv1-mousedown): Selected String: ""
[task 2017-02-01T20:36:39.463091Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input are selected (fixedDiv1-fixedDiv1-mousedown): Selected String: ""
[task 2017-02-01T20:36:39.464966Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of fixedDiv1 are selected (input-input-mousedown): Selected String: ""
[task 2017-02-01T20:36:39.470712Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input (checking on parent) are selected (input-input-mousedown): Selected String: ""
[task 2017-02-01T20:36:39.473017Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input are selected (input-input-mousedown): Selected String: ""
[task 2017-02-01T20:36:39.481140Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of fixedDiv1 aren't selected (fixedDiv1-fixedDiv1-mouseup): Selected String: "d"
[task 2017-02-01T20:36:39.486036Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input (checking on parent) are selected (fixedDiv1-fixedDiv1-mouseup): Selected String: "d"
[task 2017-02-01T20:36:39.488299Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input are selected (fixedDiv1-fixedDiv1-mouseup): Selected String: ""
[task 2017-02-01T20:36:39.491278Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of fixedDiv1 are selected (input-input-mouseup): Selected String: ""
[task 2017-02-01T20:36:39.493212Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input (checking on parent) are selected (input-input-mouseup): Selected String: ""
[task 2017-02-01T20:36:39.494985Z] 20:36:39 INFO - Buffered messages finished
[task 2017-02-01T20:36:39.496866Z] 20:36:39 INFO - TEST-UNEXPECTED-FAIL | layout/generic/test/test_selection_preventDefault.html | The contents of input aren't selected (input-input-mouseup): Selected String: ""
[task 2017-02-01T20:36:39.498515Z] 20:36:39 INFO - checkCharacter@layout/generic/test/test_selection_preventDefault.html:75:9
[task 2017-02-01T20:36:39.503333Z] 20:36:39 INFO - check@layout/generic/test/test_selection_preventDefault.html:95:5
[task 2017-02-01T20:36:39.505134Z] 20:36:39 INFO - test@layout/generic/test/test_selection_preventDefault.html:134:3
[task 2017-02-01T20:36:39.506914Z] 20:36:39 INFO - setTimeout handler*SimpleTest_setTimeoutShim@SimpleTest/SimpleTest.js:625:12
[task 2017-02-01T20:36:39.508785Z] 20:36:39 INFO - window.onload@layout/generic/test/test_selection_preventDefault.html:170:30
[task 2017-02-01T20:36:39.510536Z] 20:36:39 INFO - EventHandlerNonNull*@layout/generic/test/test_selection_preventDefault.html:170:1
[task 2017-02-01T20:36:39.513006Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of fixedDiv1 are selected (fixedDiv1-fixedDiv1-touchmove): Selected String: ""
[task 2017-02-01T20:36:39.515045Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input (checking on parent) are selected (fixedDiv1-fixedDiv1-touchmove): Selected String: ""
[task 2017-02-01T20:36:39.517216Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input are selected (fixedDiv1-fixedDiv1-touchmove): Selected String: ""
[task 2017-02-01T20:36:39.526071Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of fixedDiv1 are selected (input-input-touchmove): Selected String: ""
[task 2017-02-01T20:36:39.530549Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input (checking on parent) are selected (input-input-touchmove): Selected String: ""
[task 2017-02-01T20:36:39.538211Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input are selected (input-input-touchmove): Selected String: ""
[task 2017-02-01T20:36:39.556026Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of fixedDiv1 are selected (fixedDiv1-fixedDiv1-touchmove-preventDefault): Selected String: ""
[task 2017-02-01T20:36:39.557695Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input (checking on parent) are selected (fixedDiv1-fixedDiv1-touchmove-preventDefault): Selected String: ""
[task 2017-02-01T20:36:39.559787Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input are selected (fixedDiv1-fixedDiv1-touchmove-preventDefault): Selected String: ""
[task 2017-02-01T20:36:39.576332Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of fixedDiv1 are selected (input-input-touchmove-preventDefault): Selected String: ""
[task 2017-02-01T20:36:39.578687Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input (checking on parent) are selected (input-input-touchmove-preventDefault): Selected String: ""
[task 2017-02-01T20:36:39.582107Z] 20:36:39 INFO - TEST-PASS | layout/generic/test/test_selection_preventDefault.html | The contents of input are selected (input-input-touchmove-preventDefault): Selected String: ""
[task 2017-02-01T20:36:39.598931Z] 20:36:39 INFO - MEMORY STAT | vsize 917MB | residentFast 225MB | heapAllocated 133MB
[task 2017-02-01T20:36:39.635682Z] 20:36:39 INFO - TEST-OK | layout/generic/test/test_selection_preventDefault.html | took 635ms
this looks to be failing around here:
https://dxr.mozilla.org/mozilla-central/source/layout/generic/test/test_selection_preventDefault.html?q=path%3Atest_selection_preventDefault.html&redirect_type=single#134
looking at other failures in the log file, we seem to be having issues with the INPUT vs DIV type- possibly this is related to this bug.
Reporter | ||
Comment 1•8 years ago
|
||
:schien, I see you are the original patch author, possibly you have some ideas as to why this is happening and could propose a fix or offer suggestions that I could try to get this green?
Flags: needinfo?(schien)
Assignee | ||
Comment 2•8 years ago
|
||
This might cause by the change of default appearance of input widget. I can also reproduce this issue on my local machine, which is also Ubuntu 16.04, if running with '--repeat' flag.
Flags: needinfo?(schien)
Comment hidden (mozreview-request) |
Assignee | ||
Comment 4•8 years ago
|
||
With 'border-width' provided in CSS, I can enforce the input field to have the same style across platform, so that the hard-coded coordination of mouse/touch event can work on different platform.
@jmaher can you try this patch to see if it also works in your environment?
Flags: needinfo?(jmaher)
Assignee | ||
Comment 6•8 years ago
|
||
Comment on attachment 8832735 [details]
Bug 1335888 - disable native theming for a mochitest's input field, so its click targets can be predictable.
This test case uses hard-coded coordination to simulate mouse/touch event on input field. As I mentioned in comment #4, it might fail if the system default style of input field is changed.
@dholbert do you think this is correct approach to accommodate to any default style change in the future?
Attachment #8832735 -
Flags: feedback?(dholbert)
Comment 7•8 years ago
|
||
(In reply to Shih-Chiang Chien [:schien] (UTC+8) (use ni? plz) from comment #6)
> @dholbert do you think this is correct approach to accommodate to any
> default style change in the future?
It's probably fine in this case, but I wouldn't suggest it as a general strategy for this sort of issue. Ideally, we'd like our automated tests to be exercising the *actual* native-themed widgets that users will see most of the time.
So I'd say this sort of fix is (disabling native theming) is OK as a last resort, if it looks like there aren't any other good options for writing a test in a reliable platform-independent way. If you're needing to synthesize a mouseclick at the edge of a widget here (just a guess, not sure that's actually what's happening), I can imagine that it's appropriate for this case.
One suggestion, though -- if you don't really care about "border" in particular, you might consider just using "-moz-appearance: none" as your hackaround here. That's a more direct way to disable native theming.
Assignee | ||
Comment 8•8 years ago
|
||
Yeah this test case is more affected by the size of clickable/touchable area of input field, so enforcing test on native-themed widgets doesn't have much value in this case IMO. Using "-moz-appearance: none" here will make my intention more explicitly, thanks for this advice @dholbert!
Comment hidden (mozreview-request) |
Comment 10•8 years ago
|
||
mozreview-review |
Comment on attachment 8832735 [details]
Bug 1335888 - disable native theming for a mochitest's input field, so its click targets can be predictable.
https://reviewboard.mozilla.org/r/108946/#review111174
Nit: the commit message is a bit confusing right now.
>Bug 1335888 - disable native theming to avoid the change of the default style of input field.
Two specific concerns:
* It's not clear that you're just tweaking a test.
* "the change of the default style" is too vague here -- you're referring to a change between Ubuntu/GTK versions, but without that foreknowledge, it sounds like you're talking about some dynamic change that happens in Firefox -- or some change that we're making to default styles in Firefox itself.
How about something like the following instead:
"disable native theming for a mochitest's input field, so its click targets can be predictable"
r=me with some sort of clarification like that.
Attachment #8832735 -
Flags: review?(dholbert) → review+
Comment hidden (mozreview-request) |
Assignee | ||
Comment 12•8 years ago
|
||
Thanks for the advice, the commit message is updated.
Comment 13•8 years ago
|
||
Pushed by schien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/b4b02af50299
disable native theming for a mochitest's input field, so its click targets can be predictable. r=dholbert
Comment 14•8 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 8 years ago
status-firefox54:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla54
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → schien
You need to log in
before you can comment on or make changes to this bug.
Description
•