Bug 74279

Summary: [GTK] fullscreen/full-screen-iframe-legacy.html is flaky
Product: WebKit Reporter: Philippe Normand <pnormand>
Component: New BugsAssignee: Philippe Normand <pnormand>
Status: RESOLVED FIXED    
Severity: Normal CC: eric.carlson, mrobinson
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch eric.carlson: review+

Description Philippe Normand 2011-12-12 02:47:03 PST
[GTK] fullscreen/full-screen-iframe-legacy.html is flaky
Comment 1 Philippe Normand 2011-12-12 02:49:02 PST
Created attachment 118759 [details]
Patch
Comment 2 Eric Carlson 2012-03-06 07:24:40 PST
Comment on attachment 118759 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=118759&action=review

> LayoutTests/ChangeLog:8
> +        * fullscreen/full-screen-iframe-legacy.html: Wait canplaythrough

Nit: "Wait for canplaythrough"

> LayoutTests/fullscreen/full-screen-iframe-legacy.html:31
> +    video.load();

This should be unnecessary, setting 'src' triggers a load automatically.
Comment 3 Philippe Normand 2012-03-06 08:20:32 PST
(In reply to comment #2)
> (From update of attachment 118759 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=118759&action=review
> 
> > LayoutTests/ChangeLog:8
> > +        * fullscreen/full-screen-iframe-legacy.html: Wait canplaythrough
> 
> Nit: "Wait for canplaythrough"
> 
> > LayoutTests/fullscreen/full-screen-iframe-legacy.html:31
> > +    video.load();
> 
> This should be unnecessary, setting 'src' triggers a load automatically.

Hum if I remove that call the test times out. I might be wrong but I think setting 'src' on the video is done before the canplaythrough listener is installed on the element. So doing a new load here ensures the event is fired.
Comment 4 Eric Carlson 2012-03-06 08:58:08 PST
(In reply to comment #3)
> (In reply to comment #2)
> > > LayoutTests/fullscreen/full-screen-iframe-legacy.html:31
> > > +    video.load();
> > 
> > This should be unnecessary, setting 'src' triggers a load automatically.
> 
> Hum if I remove that call the test times out. I might be wrong but I think setting 'src' on the video is done before the canplaythrough listener is installed on the element. So doing a new load here ensures the event is fired.

The video element is in another frame so I expect the 'canplaythrough' event could fire before or after you attach the listener. I think it would be slightly cleaner to set the 'src' from the main frame instead of calling load(), but I already r+'d this so it is your call.
Comment 5 Philippe Normand 2012-03-06 09:46:53 PST
Committed r109928: <http://trac.webkit.org/changeset/109928>
Comment 6 Philippe Normand 2012-03-06 09:47:45 PST
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #2)
> > > > LayoutTests/fullscreen/full-screen-iframe-legacy.html:31
> > > > +    video.load();
> > > 
> > > This should be unnecessary, setting 'src' triggers a load automatically.
> > 
> > Hum if I remove that call the test times out. I might be wrong but I think setting 'src' on the video is done before the canplaythrough listener is installed on the element. So doing a new load here ensures the event is fired.
> 
> The video element is in another frame so I expect the 'canplaythrough' event could fire before or after you attach the listener. I think it would be slightly cleaner to set the 'src' from the main frame instead of calling load(), but I already r+'d this so it is your call.

Indeed much cleaner. I applied and tested this suggestion before landing. Thanks!