Fix failing DOM editor mochitests with cross-origin and Fission enabled
Categories
(Core :: DOM: Editor, task, P1)
Tracking
()
Fission Milestone | M6b |
People
(Reporter: neha, Assigned: mbrodesser-Igalia)
References
Details
Attachments
(2 files)
Bug 1652557: don't skip test_bug767684.html when xorigin iframes and fission are enabled. r=masayuki
47 bytes,
text/x-phabricator-request
|
Details | Review | |
47 bytes,
text/x-phabricator-request
|
Details | Review |
These tests are marked as skipped/failed for cross-origin and Fission, and need to be fixed
editor/libeditor/tests/test_bug767684.html
editor/libeditor/tests/test_resizers_resizing_elements.html
More info: https://wiki.mozilla.org/Project_Fission/Enabling_Tests_with_Fission#Cross-Origin_Mochitests
Reporter | ||
Updated•4 years ago
|
Updated•4 years ago
|
Comment 1•4 years ago
|
||
Hi Mirko, can you please take care of this (after your vacation)? Thanks!
Updated•4 years ago
|
Assignee | ||
Comment 2•4 years ago
|
||
I'll take a first look at this when I've flushed out all pending changes for the other P1 bug I'm assigned too.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
The test failed neither locally nor on try, hence enabling it again.
Assignee | ||
Comment 4•4 years ago
|
||
Neha: according to the spreadsheet linked in c1, test_bug772796.html should be part of this bug ticket, right?
Reporter | ||
Comment 5•4 years ago
|
||
Yes, these are the tests for DOM: Editor that need to be fixed:
editor/libeditor/tests/test_bug767684.html
editor/libeditor/tests/test_resizers_resizing_elements.html
editor/libeditor/tests/test_bug772796.html
editor/libeditor/tests/test_bug1258085.html
These are additional comments in the spreadsheet that might be helpful.
Assignee | ||
Comment 6•4 years ago
•
|
||
Some findings about editor/libeditor/tests/test_resizers_resizing_elements.html:
- It randomly fails when resizing <img>, <div> or <table> elements.
- The pref value of "editor.resizing.preserve_ratio" doesn't matter, it sometimes fails when it's true and sometimes when it's false.
- The test case can be reduced by removing the event listeners for "beforeinput" and "input" and it still fails sometimes.
- The test still fails when not setting "dom.input_events.beforeinput.enabled" to true.
- Running the test only with
--enable-xorigin-tests
(without--enable-fission
) doesn't seem to cause the failures. - Sleeping for 100 ms (using
setTimeout
) after allsynthesizeMouse...
calls after clicking a resizer doesn't help. Sleeping for 100 ms (usingThis wasn't reproducible anymore. I suspect a physical, unintended mouse-move might have caused the failure.setTimeout
) after allsynthesizeMouse...
calls after clicking a resizer without--enable-xorigin-tests --enable-fission
causes the failures too.- Sometimes the first test (first call of
testResizers
) fails. - Not stopping to propagate
mouse*
events still let's the test fail (only with --enable-xorigin-tests --enable-fission). - Sleeping (like in 6)) after the first
synthesizeMouseAtCenter
call leads to sporadic failures. - The failure was reproducible when waiting for 2 animation frames after resetting width and height, and after all
synthesize*
calls. - When
is(target, document.activeElement, "target is active element.");
added after clicking on the target to be resized, it always fails, even when the remainder of the test passes. - The tests uses
enableObjectResizing
, which isn't supported by Chrome and isn't spec'ed. - With
--enable-xorigin-tests --enable-fission
after synthesizing mouse clicks, unexpectedonblur
andonfocus
occur.
7. implies this is not a fission-specific problem.
8. implies it's not a problem of one test not cleaning up after its execution.
14. indicates, for fission with xorigin iframes enabled, the problem is likely the same as in bug 1653160.
Searching in the dark:
a) In case of failure, HTMLEditor::OnMouseUp
is called twice with mIsResizing == false
immediately before the failure. In all success cases, it's called first with mIsResizing == true
and then with mIsResizing == false
, so perhaps the problem is around that variable.
b) In the failure case, HTMLEditor::OnMouseDown
andHTMLEditor::StartResizing
aren't called.
c) In a failing run, HTMLEditorEventListener::MouseDown
returns early, because
IsAcceptableMouseEvent
returns false
. It's because HTMLEditor::IsAcceptableInputEvent
returns false
, because EditorBase::IsAcceptableInputEvent
returns false
because there's no focused content. There's no focused content according to the FocusManager
. In a passing run, there is focused content.
Comment 8•4 years ago
|
||
bugherder |
Assignee | ||
Comment 9•4 years ago
|
||
(In reply to Neha Kochar [:neha] from comment #5)
Yes, these are the tests for DOM: Editor that need to be fixed:
editor/libeditor/tests/test_bug767684.html
editor/libeditor/tests/test_resizers_resizing_elements.html
editor/libeditor/tests/test_bug772796.html
editor/libeditor/tests/test_bug1258085.htmlThese are additional comments in the spreadsheet that might be helpful.
@neha: the last two tests are already enabled. The spreadsheet has their statuses declared as "skipped", perhaps it's worth updating.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Reporter | ||
Comment 10•4 years ago
|
||
Yes, the spreadsheet has been updated now. Thanks for the check.
Assignee | ||
Comment 11•4 years ago
|
||
Fixed by bug 1653160.
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
bugherder |
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Description
•