Closed Bug 1335880 Opened 7 years ago Closed 7 years ago

editor/libeditor/tests/test_dragdrop.html | Test dragging input - got "trapDrag was not called", expected null

Categories

(Core :: DOM: Editor, defect, P1)

defect

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jmaher, Assigned: m_kato)

References

Details

Attachments

(1 file)

while running the tests on Ubuntu 16.04 vs 12.04, we see some unique failures, in this case we see:
editor/libeditor/tests/test_dragdrop.html | Test dragging input - got "trapDrag was not called", expected null

this is visible on opt/debug/asan:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=5ac0bd83bb7cd8ba2ecad1571c4d2038d8a70ba4&filter-searchStr=mochitest-e10s-8&selectedJob=73652332

also same for non-e10s.

here is a clip from the log:
[task 2017-02-01T20:08:15.904421Z] 20:08:15     INFO - TEST-START | editor/libeditor/tests/test_dragdrop.html
[task 2017-02-01T20:08:16.377085Z] 20:08:16     INFO - TEST-INFO | started process screentopng
[task 2017-02-01T20:08:18.540056Z] 20:08:18     INFO - TEST-INFO | screentopng: exit 0
[task 2017-02-01T20:08:18.546890Z] 20:08:18     INFO - Buffered messages logged at 20:08:16
[task 2017-02-01T20:08:18.547239Z] 20:08:18     INFO - must wait for load
[task 2017-02-01T20:08:18.547599Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Test dragging regular text 
[task 2017-02-01T20:08:18.547827Z] 20:08:18     INFO - Buffered messages finished
[task 2017-02-01T20:08:18.549721Z] 20:08:18     INFO - TEST-UNEXPECTED-FAIL | editor/libeditor/tests/test_dragdrop.html | Test dragging input - got "trapDrag was not called", expected null
[task 2017-02-01T20:08:18.550225Z] 20:08:18     INFO -     SimpleTest.is@SimpleTest/SimpleTest.js:271:5
[task 2017-02-01T20:08:18.551673Z] 20:08:18     INFO -     doTest@editor/libeditor/tests/test_dragdrop.html:52:3
[task 2017-02-01T20:08:18.557973Z] 20:08:18     INFO -     focusedOrLoaded/<@SimpleTest/SimpleTest.js:744:59
[task 2017-02-01T20:08:18.562095Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Test dragging textarea 
[task 2017-02-01T20:08:18.569083Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Test dragging contenteditable 
[task 2017-02-01T20:08:18.577504Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/html onto input 
[task 2017-02-01T20:08:18.583664Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/html onto disabled input 
[task 2017-02-01T20:08:18.586526Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/html onto readonly input 
[task 2017-02-01T20:08:18.592463Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/html onto input 
[task 2017-02-01T20:08:18.602362Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/html and text/plain onto input 
[task 2017-02-01T20:08:18.607611Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/x-moz-text-internal onto input 
[task 2017-02-01T20:08:18.613833Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/plain onto contenteditable child nodes 
[task 2017-02-01T20:08:18.617691Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/plain onto contenteditable text 
[task 2017-02-01T20:08:18.620056Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/html onto contenteditable child nodes 
[task 2017-02-01T20:08:18.629373Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/html onto contenteditable italic 
[task 2017-02-01T20:08:18.633664Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag text/html onto contenteditable italic text 
[task 2017-02-01T20:08:18.637839Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Move text/html and text/plain from contenteditable onto input 
[task 2017-02-01T20:08:18.644467Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Move text/html and text/plain from contenteditable onto itself child nodes 
[task 2017-02-01T20:08:18.647557Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Move text/html and text/plain from contenteditable onto itself italic 
[task 2017-02-01T20:08:18.650541Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Move text/html and text/plain from contenteditable onto itself text 
[task 2017-02-01T20:08:18.658622Z] 20:08:18     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Drag non-editable text/html onto contenteditable text 
[task 2017-02-01T20:08:18.661247Z] 20:08:18     INFO - MEMORY STAT | vsize 838MB | residentFast 163MB | heapAllocated 52MB
[task 2017-02-01T20:08:18.663549Z] 20:08:18     INFO - TEST-OK | editor/libeditor/tests/test_dragdrop.html | took 1592ms

and the related opt screenshot:
https://public-artifacts.taskcluster.net/R5qBr5xhRB6v3hO6Ndyb4Q/0/public/test_info//mozilla-test-fail-screenshot_gPiwnh.png

in looking at the test case I am not clear how we get to this point, we fail here:
https://dxr.mozilla.org/mozilla-central/source/editor/libeditor/tests/test_dragdrop.html?q=path%3Atest_dragdrop.html&redirect_type=single#52

could it be that we are expecting a OS themed bar at the top and we don't have it?

Neil is this your area of expertise?
Flags: needinfo?(enndeakin)
The image suggests that the text is not yet selected, so a drag will not occur. Part of the text 'Drag Me' in the textbox should be selected.

Perhaps start investigating by checking that the selection is being set properly. You could also check if a dragstart event is being fired in general (either debug synthesizeDragStart or add a capturing dragstart listener to the window).
Flags: needinfo?(enndeakin)
interesting, as I was working on this, I realized that this is a failure in the INPUT type, we seem to have many tests failing on type DIV and having INPUT.  something worth looking at as we investigate this
[task 2017-04-26T02:54:19.478136Z] 02:54:19     INFO - input.selectionStart
[task 2017-04-26T02:54:19.478632Z] 02:54:19     INFO - 1
[task 2017-04-26T02:54:19.480358Z] 02:54:19     INFO - input.selectionEnd
[task 2017-04-26T02:54:19.483207Z] 02:54:19     INFO - 4
[task 2017-04-26T02:54:19.504456Z] 02:54:19     INFO - TEST-INFO | started process screentopng
[task 2017-04-26T02:54:19.584017Z] 02:54:19     INFO - Failed to start /home/worker/workspace/build/tests/bin/screentopng for screenshot: No such file or directory
[task 2017-04-26T02:54:19.587018Z] 02:54:19     INFO - Buffered messages logged at 02:54:19
[task 2017-04-26T02:54:19.589420Z] 02:54:19     INFO - must wait for load
[task 2017-04-26T02:54:19.591350Z] 02:54:19     INFO - Buffered messages finished
[task 2017-04-26T02:54:19.594006Z] 02:54:19     INFO - TEST-UNEXPECTED-FAIL | editor/libeditor/tests/test_dragdrop.html | Test dragging input - got "trapDrag was not called", expected null
[task 2017-04-26T02:54:19.595888Z] 02:54:19     INFO -     SimpleTest.is@SimpleTest/SimpleTest.js:310:5
[task 2017-04-26T02:54:19.597956Z] 02:54:19     INFO -     doTest@editor/libeditor/tests/test_dragdrop.html:56:3
[task 2017-04-26T02:54:19.601277Z] 02:54:19     INFO -     focusedOrLoaded/<@SimpleTest/SimpleTest.js:791:59

https://treeherder.mozilla.org/logviewer.html#?job_id=94374947&repo=try&lineNumber=2481

Selection's being set properly
Component: General → Editor
Product: Testing → Core
Summary: editor/libeditor/tests/c | Test dragging input - got "trapDrag was not called", expected null → editor/libeditor/tests/test_dragdrop.html | Test dragging input - got "trapDrag was not called", expected null
this is failing on an <input> tag, also bug 1360568 is failing on an <input> tag- is there a chance that we have a different theme in 16.04 causing input tags to behave differently?

m_kato- I know you will be afk next week, is there anyone else who might be able to help out with this test?
Flags: needinfo?(m_kato)
See Also: → 1360568
(In reply to Joel Maher ( :jmaher) from comment #5)
> this is failing on an <input> tag, also bug 1360568 is failing on an <input>
> tag- is there a chance that we have a different theme in 16.04 causing input
> tags to behave differently?

Debugging the synthesizeDragStart shows the issue with the input tag
https://treeherder.mozilla.org/logviewer.html#?job_id=95447436&repo=try&lineNumber=2575
the https://public-artifacts.taskcluster.net/ata2orfmSsGTVfrwuj53Dw/0/public/logs/live_backing.log 

[task 2017-04-29T12:34:58.897671Z] 12:34:58     INFO - c 
[task 2017-04-29T12:34:58.905278Z] 12:34:58     INFO - [object Object]
[task 2017-04-29T12:34:58.905555Z] 12:34:58     INFO - dataTransfer 
[task 2017-04-29T12:34:58.905771Z] 12:34:58     INFO - [object DataTransfer]
[task 2017-04-29T12:34:58.909313Z] 12:34:58     INFO - expectedDragData 
[task 2017-04-29T12:34:58.911412Z] 12:34:58     INFO - [object Object],[object Object],[object Object],[object Object]
[task 2017-04-29T12:34:58.920286Z] 12:34:58     INFO - dtTypes.length 4
[task 2017-04-29T12:34:58.920618Z] 12:34:58     INFO - expectedDragData[i].length 4
[task 2017-04-29T12:34:58.921892Z] 12:34:58     INFO - dtTypes[j] text/_moz_htmlcontext
[task 2017-04-29T12:34:58.924232Z] 12:34:58     INFO - expectedDragData[i][j].type text/_moz_htmlcontext
[task 2017-04-29T12:34:58.928093Z] 12:34:58     INFO - dtData 
[task 2017-04-29T12:34:58.930117Z] 12:34:58     INFO - <html><body></body></html>
[task 2017-04-29T12:34:58.938827Z] 12:34:58     INFO - expectedDragData[i][j].data
[task 2017-04-29T12:34:58.941656Z] 12:34:58     INFO - <html><body></body></html>
[task 2017-04-29T12:34:58.943752Z] 12:34:58     INFO - dtTypes[j] text/_moz_htmlinfo
[task 2017-04-29T12:34:58.945884Z] 12:34:58     INFO - expectedDragData[i][j].type text/_moz_htmlinfo
[task 2017-04-29T12:34:58.948035Z] 12:34:58     INFO - dtData 
[task 2017-04-29T12:34:58.950758Z] 12:34:58     INFO - 0,0
[task 2017-04-29T12:34:58.953288Z] 12:34:58     INFO - expectedDragData[i][j].data
[task 2017-04-29T12:34:58.958628Z] 12:34:58     INFO - 0,0
[task 2017-04-29T12:34:58.963582Z] 12:34:58     INFO - dtTypes[j] text/html
[task 2017-04-29T12:34:58.968084Z] 12:34:58     INFO - expectedDragData[i][j].type text/html
[task 2017-04-29T12:34:58.970615Z] 12:34:58     INFO - dtData 
[task 2017-04-29T12:34:58.973663Z] 12:34:58     INFO - <span id="text" style="font-size: 40px;">Some Text</span>
[task 2017-04-29T12:34:58.977741Z] 12:34:58     INFO - expectedDragData[i][j].data
[task 2017-04-29T12:34:58.980241Z] 12:34:58     INFO - <span id="text" style="font-size: 40px;">Some Text</span>
[task 2017-04-29T12:34:58.983803Z] 12:34:58     INFO - dtTypes[j] text/plain
[task 2017-04-29T12:34:58.985797Z] 12:34:58     INFO - expectedDragData[i][j].type text/plain
[task 2017-04-29T12:34:58.988008Z] 12:34:58     INFO - dtData 
[task 2017-04-29T12:34:58.990467Z] 12:34:58     INFO - Some Text
[task 2017-04-29T12:34:58.993508Z] 12:34:58     INFO - expectedDragData[i][j].data
[task 2017-04-29T12:34:58.995496Z] 12:34:58     INFO - Some Text
[task 2017-04-29T12:34:59.008964Z] 12:34:59     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Test dragging regular text 
[task 2017-04-29T12:34:59.009258Z] 12:34:59     INFO - input.selectionStart
[task 2017-04-29T12:34:59.009450Z] 12:34:59     INFO - 1
[task 2017-04-29T12:34:59.009654Z] 12:34:59     INFO - input.selectionEnd
[task 2017-04-29T12:34:59.009839Z] 12:34:59     INFO - 4
[task 2017-04-29T12:34:59.030470Z] 12:34:59     INFO - TEST-INFO | started process screentopng
[task 2017-04-29T12:35:00.212758Z] 12:35:00     INFO - TEST-INFO | screentopng: exit 0
[task 2017-04-29T12:35:00.216944Z] 12:35:00     INFO - Buffered messages logged at 12:34:58
[task 2017-04-29T12:35:00.217221Z] 12:35:00     INFO - must wait for load
[task 2017-04-29T12:35:00.219362Z] 12:35:00     INFO - Buffered messages finished
[task 2017-04-29T12:35:00.222348Z] 12:35:00     INFO - TEST-UNEXPECTED-FAIL | editor/libeditor/tests/test_dragdrop.html | Test dragging input - got "trapDrag was not called", expected null
[task 2017-04-29T12:35:00.228872Z] 12:35:00     INFO -     SimpleTest.is@SimpleTest/SimpleTest.js:310:5
[task 2017-04-29T12:35:00.234217Z] 12:35:00     INFO -     doTest@editor/libeditor/tests/test_dragdrop.html:56:3
[task 2017-04-29T12:35:00.236170Z] 12:35:00     INFO -     focusedOrLoaded/<@SimpleTest/SimpleTest.js:791:59
[task 2017-04-29T12:35:00.238138Z] 12:35:00     INFO - c 
[task 2017-04-29T12:35:00.240606Z] 12:35:00     INFO - [object Object]
[task 2017-04-29T12:35:00.242735Z] 12:35:00     INFO - dataTransfer 
[task 2017-04-29T12:35:00.244608Z] 12:35:00     INFO - [object DataTransfer]
[task 2017-04-29T12:35:00.246700Z] 12:35:00     INFO - expectedDragData 
[task 2017-04-29T12:35:00.248898Z] 12:35:00     INFO - [object Object]
[task 2017-04-29T12:35:00.253359Z] 12:35:00     INFO - dtTypes.length 1
[task 2017-04-29T12:35:00.255264Z] 12:35:00     INFO - expectedDragData[i].length 1
[task 2017-04-29T12:35:00.260640Z] 12:35:00     INFO - dtTypes[j] text/plain
[task 2017-04-29T12:35:00.266386Z] 12:35:00     INFO - expectedDragData[i][j].type text/plain
[task 2017-04-29T12:35:00.269545Z] 12:35:00     INFO - dtData 
[task 2017-04-29T12:35:00.271488Z] 12:35:00     INFO - ome Te
[task 2017-04-29T12:35:00.278290Z] 12:35:00     INFO - expectedDragData[i][j].data
[task 2017-04-29T12:35:00.282248Z] 12:35:00     INFO - ome Te
[task 2017-04-29T12:35:00.284249Z] 12:35:00     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Test dragging textarea 
[task 2017-04-29T12:35:00.286570Z] 12:35:00     INFO - c 
[task 2017-04-29T12:35:00.289369Z] 12:35:00     INFO - [object Object]
[task 2017-04-29T12:35:00.292801Z] 12:35:00     INFO - dataTransfer 
[task 2017-04-29T12:35:00.294999Z] 12:35:00     INFO - [object DataTransfer]
[task 2017-04-29T12:35:00.298370Z] 12:35:00     INFO - expectedDragData 
[task 2017-04-29T12:35:00.301095Z] 12:35:00     INFO - [object Object],[object Object],[object Object],[object Object]
[task 2017-04-29T12:35:00.306570Z] 12:35:00     INFO - dtTypes.length 4
[task 2017-04-29T12:35:00.310363Z] 12:35:00     INFO - expectedDragData[i].length 4
[task 2017-04-29T12:35:00.312332Z] 12:35:00     INFO - dtTypes[j] text/_moz_htmlcontext
[task 2017-04-29T12:35:00.314283Z] 12:35:00     INFO - expectedDragData[i][j].type text/_moz_htmlcontext
[task 2017-04-29T12:35:00.319719Z] 12:35:00     INFO - dtData 
[task 2017-04-29T12:35:00.322890Z] 12:35:00     INFO - <html><body><p id="contenteditable" contenteditable="true"></p></body></html>
[task 2017-04-29T12:35:00.325599Z] 12:35:00     INFO - expectedDragData[i][j].data
[task 2017-04-29T12:35:00.328482Z] 12:35:00     INFO - <html><body><p id="contenteditable" contenteditable="true"></p></body></html>
[task 2017-04-29T12:35:00.334155Z] 12:35:00     INFO - dtTypes[j] text/_moz_htmlinfo
[task 2017-04-29T12:35:00.338235Z] 12:35:00     INFO - expectedDragData[i][j].type text/_moz_htmlinfo
[task 2017-04-29T12:35:00.341401Z] 12:35:00     INFO - dtData 
[task 2017-04-29T12:35:00.343457Z] 12:35:00     INFO - 0,0
[task 2017-04-29T12:35:00.346060Z] 12:35:00     INFO - expectedDragData[i][j].data
[task 2017-04-29T12:35:00.348797Z] 12:35:00     INFO - 0,0
[task 2017-04-29T12:35:00.356652Z] 12:35:00     INFO - dtTypes[j] text/html
[task 2017-04-29T12:35:00.358675Z] 12:35:00     INFO - expectedDragData[i][j].type text/html
[task 2017-04-29T12:35:00.362373Z] 12:35:00     INFO - dtData 
[task 2017-04-29T12:35:00.364306Z] 12:35:00     INFO - <b id="bold">editable</b>
[task 2017-04-29T12:35:00.366243Z] 12:35:00     INFO - expectedDragData[i][j].data
[task 2017-04-29T12:35:00.368210Z] 12:35:00     INFO - <b id="bold">editable</b>
[task 2017-04-29T12:35:00.371125Z] 12:35:00     INFO - dtTypes[j] text/plain
[task 2017-04-29T12:35:00.377688Z] 12:35:00     INFO - expectedDragData[i][j].type text/plain
[task 2017-04-29T12:35:00.382776Z] 12:35:00     INFO - dtData 
[task 2017-04-29T12:35:00.385018Z] 12:35:00     INFO - editable
[task 2017-04-29T12:35:00.387189Z] 12:35:00     INFO - expectedDragData[i][j].data
[task 2017-04-29T12:35:00.389375Z] 12:35:00     INFO - editable
[task 2017-04-29T12:35:00.392505Z] 12:35:00     INFO - TEST-PASS | editor/libeditor/tests/test_dragdrop.html | Test dragging contenteditable
When running ./mach mochitest editor/libeditor/tests/test_dragdrop.html on my 16.04 TLS, this is successful.  But when running ./mach mochitest editor/libeditor/tests, this is failure.

Although we use (25,6) for dragstart, but this position depends on GTK version.
Flags: needinfo?(m_kato)
Priority: -- → P1
Assignee: nobody → m_kato
Comment on attachment 8865714 [details]
Bug 1335880 - Adjust mouse position for dragstart.

https://reviewboard.mozilla.org/r/136988/#review140364

Anyway, unstable test, though.
Attachment #8865714 - Flags: review?(masayuki) → review+
Pushed by m_kato@ga2.so-net.ne.jp:
https://hg.mozilla.org/integration/autoland/rev/e83b09115327
Adjust mouse position for dragstart. r=masayuki
https://hg.mozilla.org/mozilla-central/rev/e83b09115327
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: