Bug 1523563 - Make mochitests pass with new video/webm fallback. r=jib
authorAndreas Pehrson <apehrson@mozilla.com>
Wed, 19 Jun 2019 16:09:44 +0000
changeset 481089 f5a1371cca6e8a7af4c65745489dbb0bba00a2f1
parent 481088 7c42061bf905302cb5159f79f5db4accd60260de
child 481090 6c52ecd21b3033b903d1689eecd6134ab28d5aed
push id89078
push userpehrsons@gmail.com
push dateWed, 03 Jul 2019 09:31:19 +0000
treeherderautoland@d9f2bc3dd281 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1523563
milestone69.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 1523563 - Make mochitests pass with new video/webm fallback. r=jib From the previous patch, if ogg is disabled we'll fallback on video/webm. So some tests relying on errors need it disabled too, in order to pass. Differential Revision: https://phabricator.services.mozilla.com/D35172
dom/media/test/test_mediarecorder_creation_fail.html
dom/media/test/test_mediarecorder_getencodeddata.html
--- a/dom/media/test/test_mediarecorder_creation_fail.html
+++ b/dom/media/test/test_mediarecorder_creation_fail.html
@@ -44,26 +44,31 @@ function startTest() {
 
   // This handler fires every 250ms to generate a blob.
   mediaRecorder.ondataavailable = function (evt) {
     info('ondataavailable callback fired');
     is(callbackStep, 1, 'should fired ondataavailable callback');
     is(evt.data.size, 0, 'data size should be zero');
     ok(evt instanceof BlobEvent,
        'Events fired from ondataavailable should be BlobEvent');
-    is(evt.data.type, '', 'encoder start fail, blob miemType should be empty');
+    is(evt.data.type, '', 'encoder start fail, blob mimeType should be empty');
     callbackStep = 2;
   };
 
   // Start recording
   mediaRecorder.start(250);
   is(mediaRecorder.state, 'recording', 'Media recorder should be recording');
   is(mediaRecorder.stream, stream,
      'Media recorder stream = element stream at the start of recording');
 }
 
 SimpleTest.waitForExplicitFinish();
-SpecialPowers.pushPrefEnv({"set": [["media.ogg.enabled", false]]}, startTest);
+SpecialPowers.pushPrefEnv({
+    "set": [
+      ["media.ogg.enabled", false],
+      ["media.encoder.webm.enabled", false],
+    ],
+  }, startTest);
 
 </script>
 </pre>
 </body>
 </html>
--- a/dom/media/test/test_mediarecorder_getencodeddata.html
+++ b/dom/media/test/test_mediarecorder_getencodeddata.html
@@ -5,17 +5,22 @@
   <script src="/tests/SimpleTest/SimpleTest.js"></script>
   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
 </head>
 <body>
 <pre id="test">
 <script class="testbody" type="text/javascript">
 SimpleTest.waitForExplicitFinish();
 SimpleTest.requestFlakyTimeout("untriaged");
-SpecialPowers.pushPrefEnv({"set": [["media.ogg.enabled", false]]},
+SpecialPowers.pushPrefEnv({
+    "set": [
+      ["media.ogg.enabled", false],
+      ["media.encoder.webm.enabled", false],
+    ],
+  },
   function () {
     var ac = new window.AudioContext();
     var dest = ac.createMediaStreamDestination();
     var stream = dest.stream;
     var onErrorFired = false;
     var expectedMimeType = '';
     var ondataavailableFired = false;
     setTimeout(function() {