Bug 1128069: Update webref MSE tests according to updated spec. r?gerald
See w3c/MSE Issue 19, 20 & 26.
Changing the duration now can never call the range removal algorithm. An explicit call to remove must be used for range removal.
This spec change performed the following:
- Require remove() for all Range Removals
MozReview-Commit-ID: 860PnQ9yrbc
--- a/testing/web-platform/tests/media-source/mediasource-seek-beyond-duration.html
+++ b/testing/web-platform/tests/media-source/mediasource-seek-beyond-duration.html
@@ -57,16 +57,25 @@
test.expectEvent(mediaElement, 'playing', 'Playing media.');
sourceBuffer.appendBuffer(playbackData);
});
test.waitForExpectedEvents(function()
{
assert_equals(mediaElement.duration, segmentInfo.duration);
assert_greater_than_equal(mediaElement.duration, 2.0, 'Duration is >2.0s.');
+
+ test.expectEvent(sourceBuffer, "updateend");
+ sourceBuffer.remove(1.5, Infinity);
+ assert_true(sourceBuffer.updating, "updating");
+ });
+
+ test.waitForExpectedEvents(function()
+ {
+ assert_false(sourceBuffer.updating, "updating");
test.waitForCurrentTimeChange(mediaElement, function()
{
// Update duration.
mediaSource.duration = 1.5;
seekToSpecifiedTimeSetEOSAndVerifyDone(test, mediaElement, mediaSource, 1.8);
});
});
}, 'Test seeking beyond updated media duration.');