Bug 1128069 - Update webref MSE tests according to updated spec. r=gerald, a=lizzard
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 05 Aug 2016 16:01:03 +1000
changeset 347818 4db9c594a2a1346c47f78dd287d6e31200938c4f
parent 347817 de5617e33f399f69b77d0dd4dfa400f3d6450e42
child 347819 1d21ee1349fc3faca03e2db4278728a50d496110
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald, lizzard
bugs1128069
milestone50.0a2
Bug 1128069 - Update webref MSE tests according to updated spec. r=gerald, a=lizzard 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.');