[GTK] fullscreen/full-screen-iframe-legacy.html is flaky
Created attachment 118759 [details] Patch
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.
(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.
(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.
Committed r109928: <http://trac.webkit.org/changeset/109928>
(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!