Bug 1362165: Correct test. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 26 May 2017 23:15:38 +0200
changeset 409403 138425350cc671dc20e26b2b2ba019bb2ae85c1f
parent 409402 3329385fcf2d39197bb9aae5794c5429d1ccfde4
child 409404 1e51fbdefff879e7ce0258dfac8df1456ab3487a
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1362165: Correct test. r=gerald the durationchange event will be queued during the initialization segment received algorithm. Only once the init segment has been fully processed will update/updateend be queued. As such, the updateend event must be fired before being able to call appendBuffer once again. MozReview-Commit-ID: GYQNOwWZ7DH
--- a/testing/web-platform/tests/media-source/mediasource-seekable.html
+++ b/testing/web-platform/tests/media-source/mediasource-seekable.html
@@ -28,19 +28,22 @@
     }, 'Get seekable time ranges after init segment received.');
     mediasource_testafterdataloaded(function(test, mediaElement, mediaSource, segmentInfo, sourceBuffer, mediaData)
         var initSegment = MediaSourceUtil.extractSegmentData(mediaData, segmentInfo.init);
         test.expectEvent(mediaElement, 'durationchange', 'mediaElement got duration after initsegment');
+        test.expectEvent(sourceBuffer, 'update');
+        test.expectEvent(sourceBuffer, 'updateend');
+            assert_false(sourceBuffer.updating, "updating attribute is false");
             test.expectEvent(mediaElement, 'durationchange', 'mediaElement got infinity duration');
             mediaSource.duration = Infinity;
                 assertSeekableEquals(mediaElement, '{ }', 'mediaElement.seekable');
                 // Append a segment from the middle of the stream to make sure that seekable does not use buffered.start(0) or duration as first or last value
                 var midSegment = MediaSourceUtil.extractSegmentData(mediaData, segmentInfo.media[2]);