The default bug view has changed. See this FAQ.

test_delay_load.html incorrectly appends a video to a new window before it has begun loading

RESOLVED FIXED in mozilla11

Status

()

Core
Audio/Video
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: jdm, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
mozilla11
x86
Mac OS X
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [inbound])

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

6 years ago
This only passes in Firefox because we happen to return to the event loop and run the event that starts the load while opening the new window. In Fennec, this doesn't occur, and we don't start the load until after the video has been appended to the new window. This causes the load to fail, because it's a relative URL from about:blank.
(Reporter)

Comment 1

6 years ago
Created attachment 554230 [details] [diff] [review]
Ensure that the video load begins before adding the video to a new document.
Attachment #554230 - Flags: review?(roc)
(Reporter)

Updated

6 years ago
Attachment #554230 - Attachment is obsolete: true
Attachment #554230 - Flags: review?(roc)
(Reporter)

Comment 2

6 years ago
Created attachment 554231 [details] [diff] [review]
Ensure that the video load begins before adding the video to a new document.
Attachment #554231 - Flags: review?(roc)
Attachment #554231 - Flags: review?(roc) → review+
(Reporter)

Comment 3

6 years ago
http://hg.mozilla.org/integration/mozilla-inbound/rev/cd982d1f49d6
Whiteboard: [inbound]
http://hg.mozilla.org/mozilla-central/rev/cd982d1f49d6
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9

Comment 5

6 years ago
The landing of this seems to have caused an issue when I run the content/media mochitests. The test_delay_load.html test now leaves a popup window open at the end of the tests. Reverting the patch in this bug fixes it for me.
The problem seems to be that onloadstart is never called for the element that gets put in the other window. At least the event handler never fires.
OK, so what happens is that v.onloadstart does window.open, which seems to spin the event loop so that the load event fires in there. Which means loaded() actually runs before we add the window to 'testWindows', so the window isn't closed.

For the test to work we really need to avoid our events firing during window.open. I'll try doing the window.open early, outside the event handler.
Created attachment 576056 [details] [diff] [review]
fix test
Attachment #576056 - Flags: review?(chris.double)

Updated

5 years ago
Attachment #576056 - Flags: review?(chris.double) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/10f58db28c81
https://hg.mozilla.org/mozilla-central/rev/10f58db28c81
Target Milestone: mozilla9 → mozilla11
You need to log in before you can comment on or make changes to this bug.