Bug 1180935: P4. Ensure endOfStream() is call in mochitest. r=gerald
authorJean-Yves Avenard <jyavenard@mozilla.com>
Fri, 07 Aug 2015 18:00:02 +1000
changeset 256966 fb0a38fa1673af07fcf48ec7a856cd163ff41782
parent 256965 fcf7077de8febcbdcac5e1d51ae9fc210f84cb44
child 256967 06451617ab35e5f4ccdd391730f1fae9fd193db0
push id29197
push userphilringnalda@gmail.com
push dateSun, 09 Aug 2015 20:35:19 +0000
treeherdermozilla-central@fd69d51a4068 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1180935
milestone42.0a1
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 1180935: P4. Ensure endOfStream() is call in mochitest. r=gerald In test_HaveMetadataUnbufferedSeek_mp4, do endOfStream after appending 2nd buffer in case decoder doesn't output enough frames to seek to the target point.
dom/media/mediasource/test/test_HaveMetadataUnbufferedSeek_mp4.html
--- a/dom/media/mediasource/test/test_HaveMetadataUnbufferedSeek_mp4.html
+++ b/dom/media/mediasource/test/test_HaveMetadataUnbufferedSeek_mp4.html
@@ -28,16 +28,19 @@ runWithMSE(function (ms, v) {
       ok(v.readyState >= v.HAVE_CURRENT_DATA, "readyState is >= CURRENT_DATA");
       v.currentTime = target;
     });
 
     v.addEventListener("seeking", function () {
       is(v.readyState, v.HAVE_METADATA, "readyState is HAVE_METADATA");
       fetchWithXHR("bipbop/bipbop2s.mp4", function (arrayBuffer) {
         // 25819 is the offset of the first media segment's end
+        sb.addEventListener("updateend", function () {
+          ms.endOfStream();
+        });
         sb.appendBuffer(new Uint8Array(arrayBuffer, 25819));
       });
     });
 
     v.addEventListener("seeked", function () {
       SimpleTest.finish();
     });
   });