Closed Bug 1547489 Opened 6 months ago Closed 6 months ago

Intermittent browser/base/content/test/general/browser_bug734076.js | no domain was inherited for 'show only this frame' - false == true -

Categories

(Firefox :: General, defect, P5)

defect

Tracking

()

RESOLVED FIXED
Firefox 68
Tracking Status
firefox-esr60 --- unaffected
firefox67 --- unaffected
firefox68 --- fixed

People

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

References

(Regression)

Details

(Keywords: intermittent-failure, regression, Whiteboard: [stockwell disable-recommended])

Attachments

(1 file, 1 obsolete file)

#[markdown(off)]
Filed by: cbrindusan [at] mozilla.com

https://treeherder.mozilla.org/logviewer.html#?job_id=243096082&repo=autoland

https://queue.taskcluster.net/v1/task/aQMMMUSuREG4KnArihOI_w/runs/0/artifacts/public/logs/live_backing.log

12:35:22 INFO - TEST-START | browser/base/content/test/general/browser_bug734076.js
12:35:23 INFO - TEST-INFO | started process screencapture
12:35:23 INFO - TEST-INFO | screencapture: exit 0
12:35:23 INFO - Buffered messages logged at 12:35:22
12:35:23 INFO - Entering test bound
12:35:23 INFO - Run subtest view background image
12:35:23 INFO - onImage: false
12:35:23 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "data:text/html,%3Cscript%3Edocument.write(document.domain);%3C/script%3E" line: 0}]
12:35:23 INFO - TEST-PASS | browser/base/content/test/general/browser_bug734076.js | no domain was inherited for view background image - true == true -
12:35:23 INFO - Run subtest view image
12:35:23 INFO - onImage: true
12:35:23 INFO - Console message: [JavaScript Error: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." {file: "data:text/html,%3Cscript%3Edocument.write(document.domain);%3C/script%3E" line: 0}]
12:35:23 INFO - TEST-PASS | browser/base/content/test/general/browser_bug734076.js | no domain was inherited for view image - true == true -
12:35:23 INFO - Buffered messages logged at 12:35:23
12:35:23 INFO - Run subtest show only this frame
12:35:23 INFO - onImage: false
12:35:23 INFO - Buffered messages finished
12:35:23 INFO - TEST-UNEXPECTED-FAIL | browser/base/content/test/general/browser_bug734076.js | no domain was inherited for 'show only this frame' - false == true -

Assignee: nobody → emilio

Same as the other test.

This one I haven't verified yet it fixes the intermittent (try is running atm),
but I'm moderately sure it will.

Flags: needinfo?(emilio)
Flags: needinfo?(emilio)

I could repro this locally with the background image test, wat.

Whiteboard: [stockwell disable-recommended] → [stockwell needswork:owner]
Attachment #9062174 - Attachment is obsolete: true

This test is already somewhat racy. At least locally, I could see the
background-image test fail sometimes in chaos mode. This is because we don't
wait for the background-image to load. But that's a different bug in any case.

Anyway, this failure happens because we're sending an event to the <iframe>,
but the context menu code expects the target of the event to be a node inside
the cross-origin iframe, in order for this check to work:

https://searchfox.org/mozilla-central/rev/b4e790d05f5a146d186c238bac5601a553581d23/browser/actors/ContextMenuChild.jsm#1036

Since <iframe> is cross-origin, stuff in it may not have been laid out yet.
This will also be a problem with fission, afaict, where that check wouldn't
even be possible, I think. If stuff there hasn't been laid out, the thing
getting the event (the contextmenu's target) is the <iframe>, rather than the
content document's target.

Make sure to target content under the subframe for now. This change is a bit
subtle, in the sense that what ensures stuff is getting laid out after this
change is the getBoundingClientRect() calls in:

https://searchfox.org/mozilla-central/rev/b4e790d05f5a146d186c238bac5601a553581d23/testing/mochitest/tests/SimpleTest/AsyncUtilsContent.js#75

However we rely on those all over the place already (even before my change), so
I think this is the easiest / better test fix for now.

With Fission we'll probably need to change how those context-menu checks work so
that they work when targeting the <iframe> or forward to the nested child
process or something.

Flags: needinfo?(emilio)
Whiteboard: [stockwell disable-recommended] → [stockwell needswork:owner]
Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/49c8a6dac9be
Make sure to target something inside the cross-origin iframe in browser_bug734076.js. r=mconley
Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.