Seek to end after duration change in HTMLMediaElement
Created attachment 162513 [details] Patch
Comment on attachment 162513 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=162513&action=review > LayoutTests/http/tests/media/media-source/seek-to-end-after-duration-change.html:13 > + waitForEventOnce('loadeddata', onLoadedData, false, false, video); waitForEventOnce only takes three parameters, what are the last two intended to do? > LayoutTests/http/tests/media/media-source/seek-to-end-after-duration-change.html:20 > + waitForEventOnce('seeked', onExplicitSeek, false, false, video); Ditto. > LayoutTests/http/tests/media/media-source/seek-to-end-after-duration-change.html:32 > + waitForEventOnce('durationchange', onDurationChange, false, false, video); Ditto. > LayoutTests/http/tests/media/media-source/seek-to-end-after-duration-change.html:42 > + waitForEventOnce('seeking', function() { > + waitForEventOnce('seeked', onSeekToEnd, false, false, video); > + mediaSource.endOfStream(); > + }, false, false, video); Ditto. > LayoutTests/http/tests/media/media-source/seek-to-end-after-duration-change.html:50 > + failTest("Seeked to " + currentTime.toFixed(3) + " instead of " + duration.toFixed(3)); You compare currenTime and duration with full precision so the error message should do the same.
Created attachment 162713 [details] Patch
Comment on attachment 162513 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=162513&action=review >> LayoutTests/http/tests/media/media-source/seek-to-end-after-duration-change.html:13 >> + waitForEventOnce('loadeddata', onLoadedData, false, false, video); > > waitForEventOnce only takes three parameters, what are the last two intended to do? Whoops; originally I had used waitForEvent() (which has 5 parameters -- the 4th is for "run one time", and the 5th is the element on which the event listener is attached), then realized I wanted waitForEventOnce() and didn't remove the last two parameters. Since I always attach the event listener to "video," the waitForEventOnce() 3-parameter method works. Changed all callsites. >> LayoutTests/http/tests/media/media-source/seek-to-end-after-duration-change.html:20 >> + waitForEventOnce('seeked', onExplicitSeek, false, false, video); > > Ditto. Fixed. >> LayoutTests/http/tests/media/media-source/seek-to-end-after-duration-change.html:32 >> + waitForEventOnce('durationchange', onDurationChange, false, false, video); > > Ditto. Fixed. >> LayoutTests/http/tests/media/media-source/seek-to-end-after-duration-change.html:42 >> + }, false, false, video); > > Ditto. Fixed, here and a few lines above. >> LayoutTests/http/tests/media/media-source/seek-to-end-after-duration-change.html:50 >> + failTest("Seeked to " + currentTime.toFixed(3) + " instead of " + duration.toFixed(3)); > > You compare currenTime and duration with full precision so the error message should do the same. Done.
Comment on attachment 162713 [details] Patch Clearing flags on attachment: 162713 Committed r127949: <http://trac.webkit.org/changeset/127949>
All reviewed patches have been landed. Closing bug.