Bug 74279 - [GTK] fullscreen/full-screen-iframe-legacy.html is flaky
Summary: [GTK] fullscreen/full-screen-iframe-legacy.html is flaky
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-12 02:47 PST by Philippe Normand
Modified: 2012-03-06 09:47 PST (History)
2 users (show)

See Also:


Attachments
Patch (2.60 KB, patch)
2011-12-12 02:49 PST, Philippe Normand
eric.carlson: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!