blob: 274379024b85bc7817169a7fd362fcae4a11c204 [file] [log] [blame]
<!DOCTYPE html>
<script src=../../resources/testharness.js></script>
<script src=../../resources/testharnessreport.js></script>
<script>
// Check the Video formats that should be recordable and one that should not be.
// Supported formats return "maybe". Same for Audio.
// https://w3c.github.io/mediacapture-record/MediaRecorder.html#methods
test(function() {
assert_equals(MediaRecorder.canRecordMimeType("video/invalid"), "");
}, 'check MediaRecorder.canRecordMimeType() with video/invalid');
test(function() {
assert_equals(MediaRecorder.canRecordMimeType("video/vp8"), "maybe");
}, 'check MediaRecorder.canRecordMimeType() with video/vp8');
test(function() {
assert_equals(MediaRecorder.canRecordMimeType("video/vp9"), "maybe");
}, 'check MediaRecorder.canRecordMimeType() with video/vp9');
test(function() {
assert_equals(MediaRecorder.canRecordMimeType("audio/invalid"), "");
}, 'check MediaRecorder.canRecordMimeType() with audio/invalid');
test(function() {
assert_equals(MediaRecorder.canRecordMimeType("audio/opus"), "maybe");
}, 'check MediaRecorder.canRecordMimeType() with audio/opus');
</script>