Bug 1261007 - Part 2 - fix test_mediarecorder_webm_support. r=rillian
authorbechen <bechen@mozilla.com>
Mon, 18 Apr 2016 12:06:15 +0800
changeset 354469 5e3441e1a4c1e89d2502d744fe1a666d1731cc4c
parent 354468 4825464462039a9e5202e9e05a1662110b8f05e6
child 354470 a1da3524fc2509c7c0db6f30c5594c9a71a2c168
push id16088
push usergkruglov@mozilla.com
push dateWed, 20 Apr 2016 23:45:23 +0000
reviewersrillian
bugs1261007
milestone48.0a1
Bug 1261007 - Part 2 - fix test_mediarecorder_webm_support. r=rillian MozReview-Commit-ID: BwHAEPWGXhV
dom/media/MediaRecorder.cpp
dom/media/test/test_mediarecorder_webm_support.html
--- a/dom/media/MediaRecorder.cpp
+++ b/dom/media/MediaRecorder.cpp
@@ -1239,24 +1239,22 @@ MediaRecorder::SetOptions(const MediaRec
   //
   // Until dynamic changes are supported, I prefer to be safe and err
   // slightly high
   if (aInitDict.mBitsPerSecond.WasPassed() && !aInitDict.mVideoBitsPerSecond.WasPassed()) {
     mVideoBitsPerSecond = mBitsPerSecond;
   }
 }
 
-static char const *const gWebMAudioEncoderCodecs[3] = {
-  "vorbis",
+static char const *const gWebMAudioEncoderCodecs[2] = {
   "opus",
   // no VP9 yet
   nullptr,
 };
-static char const *const gWebMVideoEncoderCodecs[5] = {
-  "vorbis",
+static char const *const gWebMVideoEncoderCodecs[4] = {
   "opus",
   "vp8",
   "vp8.0",
   // no VP9 yet
   nullptr,
 };
 static char const *const gOggAudioEncoderCodecs[2] = {
   "opus",
--- a/dom/media/test/test_mediarecorder_webm_support.html
+++ b/dom/media/test/test_mediarecorder_webm_support.html
@@ -4,13 +4,15 @@
   <title>Media Recording - test WebM MIME support</title>
   <script type="text/javascript" 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">
 ok(MediaRecorder.isTypeSupported('video/webm'), 'Should support video/webm');
-ok(MediaRecorder.isTypeSupported('video/webm; codecs="vp8, vorbis"'), 'Should support video/webm + vp8/vorbis');
+ok(!MediaRecorder.isTypeSupported('video/webm; codecs="vp8, vorbis"'), 'Should not support video/webm + vp8/vorbis');
 ok(!MediaRecorder.isTypeSupported('video/webm; codecs="vp9, vorbis"'), 'Should not support video/webm + vp9/vorbis');
+ok(MediaRecorder.isTypeSupported('video/webm; codecs="vp8, opus"'), 'Should support video/webm + vp8/opus');
+ok(!MediaRecorder.isTypeSupported('video/webm; codecs="vp9, opus"'), 'Should not support video/webm + vp9/opus');
 </script>
 </head>
 </html>