Bug 1128069: Update webref MSE tests according to updated spec. r?gerald draft
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 05 Aug 2016 16:01:03 +1000
changeset 397765 9b5cfff281909e047d89fcdeae828548d1474f84
parent 397764 281236cc70c0576da302d3f96c37e60f3b3d022b
child 397766 2f7e17d48ede2fb7a21a294bc5d58df51f90de2f
push id25391
push userbmo:jyavenard@mozilla.com
push dateMon, 08 Aug 2016 09:33:44 +0000
reviewersgerald
bugs1128069
milestone51.0a1
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
testing/web-platform/tests/media-source/mediasource-seek-beyond-duration.html
--- 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.');