Closed Bug 1719387 Opened 5 months ago Closed 5 months ago

Perma [tier2] mochitest-plain headless editor/libeditor/tests/test_bug795418-2.html | unexpected HTML for test - got "<span xmlns=\"http://www.w3.org/1999/xhtml\">AB</span>", expected "<blockquote xmlns=\"http://www.w3.org/1999/xhtml\" type=\"cite\">

Categories

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

defect

Tracking

()

RESOLVED FIXED
91 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox89 --- unaffected
firefox90 --- unaffected
firefox91 --- fixed

People

(Reporter: intermittent-bug-filer, Assigned: masayuki)

References

(Depends on 2 open bugs, Regression)

Details

(Keywords: intermittent-failure, regression, Whiteboard: [stockwell needswork:owner])

Attachments

(2 files)

Filed by: apavel [at] mozilla.com
Parsed log: https://treeherder.mozilla.org/logviewer?job_id=344520986&repo=mozilla-central
Full log: https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/OcHS5LWKSIeQyzL9OWjcBw/runs/0/artifacts/public/logs/live_backing.log


[task 2021-07-07T00:05:17.321Z] 00:05:17     INFO - TEST-START | editor/libeditor/tests/test_bug795418-2.html
[task 2021-07-07T00:05:17.373Z] 00:05:17     INFO - TEST-INFO | started process screentopng
[task 2021-07-07T00:05:17.764Z] 00:05:17     INFO - TEST-INFO | screentopng: exit 0
[task 2021-07-07T00:05:17.766Z] 00:05:17     INFO - Buffered messages logged at 00:05:17
[task 2021-07-07T00:05:17.766Z] 00:05:17     INFO - must wait for load
[task 2021-07-07T00:05:17.767Z] 00:05:17     INFO - Initializing clipboard with "waitForClipboard-known-value-0.8647595836601568"...
[task 2021-07-07T00:05:17.767Z] 00:05:17     INFO - Succeeded initializing clipboard, start requested things...
[task 2021-07-07T00:05:17.768Z] 00:05:17     INFO - copied text: ""
[task 2021-07-07T00:05:17.769Z] 00:05:17     INFO - TEST-PASS | editor/libeditor/tests/test_bug795418-2.html | Clipboard has the given value: '' 
[task 2021-07-07T00:05:17.769Z] 00:05:17     INFO - Buffered messages finished
[task 2021-07-07T00:05:17.770Z] 00:05:17     INFO - TEST-UNEXPECTED-FAIL | editor/libeditor/tests/test_bug795418-2.html | unexpected HTML for test - got "<span xmlns=\"http://www.w3.org/1999/xhtml\">AB</span>", expected "<blockquote xmlns=\"http://www.w3.org/1999/xhtml\" type=\"cite\">Copy this</blockquote><span xmlns=\"http://www.w3.org/1999/xhtml\">AB</span>"
[task 2021-07-07T00:05:17.770Z] 00:05:17     INFO -     SimpleTest.is@SimpleTest/SimpleTest.js:500:14
[task 2021-07-07T00:05:17.770Z] 00:05:17     INFO -     checkResult@editor/libeditor/tests/test_bug795418-2.html:44:7
[task 2021-07-07T00:05:17.770Z] 00:05:17     INFO - GECKO(8571) | MEMORY STAT | vsize 2630MB | residentFast 160MB | heapAllocated 18MB
[task 2021-07-07T00:05:17.771Z] 00:05:17     INFO - TEST-OK | editor/libeditor/tests/test_bug795418-2.html | took 58ms

Masayuki, could you take a look at this failure which started with the merge of bug 1716863 to mozilla-central? (These tasks don't run on autoland.)

Flags: needinfo?(masayuki)
Keywords: regression
Regressed by: 1716863
Summary: Perma [tier2] editor/libeditor/tests/test_bug795418-2.html | unexpected HTML for test - got "<span xmlns=\"http://www.w3.org/1999/xhtml\">AB</span>", expected "<blockquote xmlns=\"http://www.w3.org/1999/xhtml\" type=\"cite\">Copy this</blockquote> → Perma [tier2] mochitest-plain headless editor/libeditor/tests/test_bug795418-2.html | unexpected HTML for test - got "<span xmlns=\"http://www.w3.org/1999/xhtml\">AB</span>", expected "<blockquote xmlns=\"http://www.w3.org/1999/xhtml\" type=\"cite\">

Yeah, of course, but looks like that it's caused by failure of copying text. And I saw odd behavior in the test previously.
https://searchfox.org/mozilla-central/diff/ca4a57799a540bcaae83bd402a478c0dd76d0166/editor/libeditor/tests/test_bug795418-2.html#70

So, I think that something is completely wrong in the test.

Assignee: nobody → masayuki

Selecting text for copy completely succeeded, but oddly, empty text is copied into the clipboard even if I kick the copy command directly. copy command is fired as expected. So, something handling copy in headless mode is broken...

Flags: needinfo?(masayuki)

I got it. HeadlessClipboard supports only text/plain. However, HTMLEditor::PasteAsQuotaionAsAction() should support inserting plaintext too.

Depends on: 1686012

Also caused by bug 1697989.

Status: NEW → ASSIGNED
Depends on: 1697989

With the change of bug 1716863, it retrieves editing host, but it's nullptr
if there is no <body> element in XHTML document. The root cause should be
fixed in bug 1697989, but for now, we should allow it only in XHTML document
for safer regression fix.

Until fixing bug 1686012, clipboard in the headless mode does not support
"text/html" flavor. Therefore, the waitForClipboard in the test does not
get expected value as aData in the first callback.

So, it should request text/unicode in the headless mode.

Depends on D119483

There are 35 total failures in the last 7 days on linux1804-64-shippable opt
Recent failure log: https://treeherder.mozilla.org/logviewer?job_id=344884206&repo=mozilla-central&lineNumber=11334

[task 2021-07-11T11:21:14.772Z] 11:21:14 INFO - TEST-START | editor/libeditor/tests/test_bug795418-2.html
[task 2021-07-11T11:21:14.821Z] 11:21:14 INFO - TEST-INFO | started process screentopng
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - TEST-INFO | screentopng: exit 0
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - Buffered messages logged at 11:21:14
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - must wait for load
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - Initializing clipboard with "waitForClipboard-known-value-0.5142075867997061"...
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - Succeeded initializing clipboard, start requested things...
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - copied text: ""
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - TEST-PASS | editor/libeditor/tests/test_bug795418-2.html | Clipboard has the given value: ''
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - Buffered messages finished
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - TEST-UNEXPECTED-FAIL | editor/libeditor/tests/test_bug795418-2.html | unexpected HTML for test - got "<span xmlns="http://www.w3.org/1999/xhtml\">AB</span>", expected "<blockquote xmlns="http://www.w3.org/1999/xhtml\" type="cite">Copy this</blockquote><span xmlns="http://www.w3.org/1999/xhtml\">AB</span>"
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - SimpleTest.is@SimpleTest/SimpleTest.js:500:14
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - checkResult@editor/libeditor/tests/test_bug795418-2.html:44:7
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - GECKO(12824) | MEMORY STAT | vsize 2629MB | residentFast 158MB | heapAllocated 18MB
[task 2021-07-11T11:21:15.247Z] 11:21:15 INFO - TEST-OK | editor/libeditor/tests/test_bug795418-2.html | took 56ms

Whiteboard: [stockwell needswork:owner]
Pushed by masayuki@d-toybox.com:
https://hg.mozilla.org/integration/autoland/rev/95aa2712dd58
Make `HTMLEditor::HandleInsertText()` allow to insert text outside `<body>` in XHTML document r=m_kato
https://hg.mozilla.org/integration/autoland/rev/c38ac3f021ac
Make `test_bug795418-2.html` request `text/unicode` flavor in the headless mode r=smaug
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.