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 256985 fb0a38fa1673af07fcf48ec7a856cd163ff41782
parent 256984 fcf7077de8febcbdcac5e1d51ae9fc210f84cb44
child 256986 06451617ab35e5f4ccdd391730f1fae9fd193db0
push id14559
push userphilringnalda@gmail.com
push dateSun, 09 Aug 2015 23:41:14 +0000
treeherderfx-team@0e269a1f1beb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgerald
bugs1180935
milestone42.0a1
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();
     });
   });