Bug 1293186: Do not assume that currentTime is still at seeking position when seeking event is fired. r?jwwang
The seeking attribute is changed synchronously, however, the seeking event is fired asynchronously. It is possible that by the time the seeking event is fired, the seeking operation has already completed and that the "time marches on", causing currentTime to be past the seeking position.
MozReview-Commit-ID: IB83w6zKCLF
--- a/testing/web-platform/tests/media-source/mediasource-play-then-seek-back.html
+++ b/testing/web-platform/tests/media-source/mediasource-play-then-seek-back.html
@@ -25,17 +25,16 @@
{
assert_greater_than(mediaElement.currentTime, 0.0, 'Playback has started after seek.');
test.done();
});
}
function finishSeekThenPlay()
{
- assert_equals(mediaElement.currentTime, 0.0, 'Current time is 0.0');
test.expectEvent(mediaElement, 'seeked', 'mediaElement finished seek');
test.waitForExpectedEvents(confirmPlayThenEnd);
}
function delayedPlayHandler()
{
assert_greater_than(mediaElement.currentTime, 0.0, 'Playback has started.');