Closed Bug 1244414 Opened 8 years ago Closed 8 years ago

Intermittent TEST-UNEXPECTED-TIMEOUT | /web-animations/animatable/animate.html | Element.animate() correctly sets the Animation's timeline when triggered on an element in a different document - Test timed out

Categories

(Testing :: web-platform-tests, defect)

defect
Not set
normal

Tracking

(firefox47 fixed)

RESOLVED FIXED
mozilla47
Tracking Status
firefox47 --- fixed

People

(Reporter: philor, Assigned: birtles)

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 1 obsolete file)

This is probably because this test assumes the iframe has not loaded yet and waits on its loaded event. It should check its readyState first.

Will look into next week.
Assignee: nobody → bbirtles
Status: NEW → ASSIGNED
Attachment #8719680 - Flags: review?(bzbarsky)
Comment on attachment 8719680 [details] [diff] [review]
Don't wait for iframe to load if it has already loaded

No, this is racy.  The problem is that iframe.contentDocument will never be null here: it'll either be the initial about:blank document or the data: document.  And in the former case it may well have a readyState of "complete"; at least per spec I think it probably should, if not in our impl.  See https://html.spec.whatwg.org/multipage/browsers.html#creating-a-new-browsing-context step 3 and the fact taht https://html.spec.whatwg.org/multipage/dom.html#current-document-readiness says that this document, not being associated with a parser, should have its current document readiness set to "complete".

The right way to do this in a non-racy way, sadly, is to have your function createElement the iframe, set its src, add the load listener, and then insert it into the document.
Attachment #8719680 - Flags: review?(bzbarsky) → review-
Not sure if we should be using remove() in web-platform-tests, however. It's supported in Edge, but not IE, but I guess that's ok.
Attachment #8720105 - Flags: review?(bzbarsky)
Attachment #8719680 - Attachment is obsolete: true
I just re-read your comment---I guess I should add the event listener before attaching to the document.
Comment on attachment 8720105 [details] [diff] [review]
Create iframe element from script to avoid racing with the load event

r=me, though doing the appendChild call after the addEventListener would be clearer.  It's probably fine either way, though, because the load event always fires async.

Also, you may want to put back the height/width attrs the iframe used to have...
Attachment #8720105 - Flags: review?(bzbarsky) → review+
https://hg.mozilla.org/mozilla-central/rev/9f1df78b4831
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: