Bug 1128069: Correct invalid test. r?jwwang draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 05 Aug 2016 14:51:15 +1000
changeset 397763 90d48a0a6a716c7b7dd63e2ea793f53b2aad8344
parent 397710 f137cd1be5b61c6ba60e57f50947fc43ff282911
child 397764 281236cc70c0576da302d3f96c37e60f3b3d022b
push id25391
push userbmo:jyavenard@mozilla.com
push dateMon, 08 Aug 2016 09:33:44 +0000
reviewersjwwang
bugs1128069
milestone51.0a1
Bug 1128069: Correct invalid test. r?jwwang It is incorrect to assume that the seeking attribute will still be true once the seeking event handler gets to run. Seeking may have completed between the time the seeking event was queued and the time the seeking env is fired. MozReview-Commit-ID: CZFFotMyaIu
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,28 +25,28 @@
                     {
                         assert_greater_than(mediaElement.currentTime, 0.0, 'Playback has started after seek.');
                         test.done();
                     });
                 }
 
                 function finishSeekThenPlay()
                 {
-                    assert_true(mediaElement.seeking, 'mediaElement is seeking');
                     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.');
                     test.expectEvent(mediaElement, 'seeking', 'mediaElement');
                     mediaElement.currentTime = 0.0;
+                    assert_true(mediaElement.seeking, 'mediaElement is seeking');
 
                     test.waitForExpectedEvents(finishSeekThenPlay);
                 }
 
                 test.waitForExpectedEvents(function()
                 {
                     test.waitForCurrentTimeChange(mediaElement, delayedPlayHandler);
                 });