Bug 1261007 - Part 2 - fix test_mediarecorder_webm_support. r=rillian

MozReview-Commit-ID: BwHAEPWGXhV

--HG--
extra : transplant_source : %A1J%84%BE%E2%DB%7F%D9%ACN%DC%0A%EF%82%5D%FC8%FE%EE%5D
This commit is contained in:
bechen 2016-04-18 12:06:15 +08:00
parent 7f96be6bff
commit 6538aea380
2 changed files with 5 additions and 5 deletions

View File

@ -1244,14 +1244,12 @@ MediaRecorder::SetOptions(const MediaRecorderOptions& aInitDict)
}
}
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",

View File

@ -9,8 +9,10 @@
<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>