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
--- 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);
});