Bug 1293186: Do not assume that currentTime is still at seeking position when seeking event is fired. r?jwwang draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Mon, 08 Aug 2016 18:26:45 +1000
changeset 397754 42001f753048fb3097cef686e6fd5f30dd491440
parent 397753 29dfc0b24fbd4cac107c9098c8f0d154162e3a35
child 527532 d15fcb7d720031283f4cc76013f754ef0fc2e200
push id25385
push userbmo:jyavenard@mozilla.com
push dateMon, 08 Aug 2016 08:27:46 +0000
reviewersjwwang
bugs1293186
milestone51.0a1
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
testing/web-platform/tests/media-source/mediasource-play-then-seek-back.html
--- 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.');