Bug 1512175 - Expand mochitest for webm mime type support with various casing. r=jib
authorAndreas Pehrson <apehrson@mozilla.com>
Thu, 03 Oct 2019 22:09:18 +0000
changeset 496307 b90cfb7ecee36ee95bf6f4f4a9fac152cf8de611
parent 496306 044cfbab987a82f80ae81af458585231f7f5fa57
child 496308 a76ec7f58d504fc8102bf9049f4e91f2cb7a6b20
push id97160
push userpehrsons@gmail.com
push dateFri, 04 Oct 2019 09:26:59 +0000
treeherderautoland@d7ab956c2962 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1512175
milestone71.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 1512175 - Expand mochitest for webm mime type support with various casing. r=jib Differential Revision: https://phabricator.services.mozilla.com/D47068
dom/media/test/test_mediarecorder_webm_support.html
--- a/dom/media/test/test_mediarecorder_webm_support.html
+++ b/dom/media/test/test_mediarecorder_webm_support.html
@@ -3,16 +3,54 @@
 <head>
   <title>Media Recording - test WebM MIME support</title>
   <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">
-ok(MediaRecorder.isTypeSupported('video/webm'), 'Should support video/webm');
-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');
+ok(MediaRecorder.isTypeSupported('audio/webm'),
+   'Should support audio/webm');
+ok(MediaRecorder.isTypeSupported('AUDIO/WEBM'),
+   'Should support audio/webm, upper case');
+ok(MediaRecorder.isTypeSupported('AuDiO/wEbM'),
+   'Should support audio/webm, mixed case');
+
+ok(MediaRecorder.isTypeSupported('audio/webm;codecs=opus'),
+   'Should support audio/webm;codecs=opus');
+ok(MediaRecorder.isTypeSupported('AUDIO/WEBM;CODECS=opus'),
+   'Should support audio/webm;codecs=opus, upper case');
+ok(MediaRecorder.isTypeSupported('AuDiO/wEbM;cOdEcS=opus'),
+   'Should support audio/webm;codecs=opus, mixed case');
+
+ok(MediaRecorder.isTypeSupported('video/webm'),
+   'Should support video/webm');
+ok(MediaRecorder.isTypeSupported('VIDEO/WEBM'),
+   'Should support video/webm, upper case');
+ok(MediaRecorder.isTypeSupported('vIdEo/WeBm'),
+   'Should support video/webm, mixed case');
+
+ok(MediaRecorder.isTypeSupported('video/webm; codecs="vp8"'),
+   'Should support video/webm; codecs="vp8"');
+ok(MediaRecorder.isTypeSupported('VIDEO/WEBM; CODECS="vp8"'),
+   'Should support video/webm; codecs="vp8", upper case');
+ok(MediaRecorder.isTypeSupported('vIdEo/WeBm; CoDeCs="vp8"'),
+   'Should support video/webm; codecs="vp8", mixed case');
+
+ok(MediaRecorder.isTypeSupported('video/webm; codecs="vp8.0"'),
+   'Should support video/webm; codecs="vp8.0"');
+ok(MediaRecorder.isTypeSupported('VIDEO/WEBM; CODECS="vp8.0"'),
+   'Should support video/webm; codecs="vp8.0", upper case');
+ok(MediaRecorder.isTypeSupported('vIdEo/WeBm; CoDeCs="vp8.0"'),
+   'Should support video/webm; codecs="vp8.0", mixed case');
+
+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>