Skip to content

Commit

Permalink
Add a WPT.
Browse files Browse the repository at this point in the history
Differential Revision: https://phabricator.services.mozilla.com/D138779

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1755332
gecko-commit: c89935b9bac58f6cfb994e061dcc395963d5cc93
gecko-reviewers: alwu
  • Loading branch information
padenot authored and moz-wptsync-bot committed Feb 16, 2022
1 parent 0a408b9 commit 5060127
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions media-capabilities/decodingInfo.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,29 @@ promise_test(t => {
}));
}, "Test that decodingInfo rejects if the video configuration contentType isn't of type video");

promise_test(t => {
return promise_rejects_js(t, TypeError, navigator.mediaCapabilities.decodingInfo({
type: 'file',
video: {
contentType: 'application/ogg; codec=vorbis',
width: 800,
height: 600,
bitrate: 3000,
framerate: 24,
},
}));
}, "Test that decodingInfo rejects if the video configuration contentType is of type audio");

promise_test(t => {
return promise_rejects_js(t, TypeError, navigator.mediaCapabilities.decodingInfo({
type: 'file',
audio: {
contentType: 'application/ogg; codec=theora',
channels: 2,
},
}));
}, "Test that decodingInfo rejects if the audio configuration contentType is of type video");

promise_test(t => {
return promise_rejects_js(t, TypeError, navigator.mediaCapabilities.decodingInfo({
type: 'file',
Expand Down

0 comments on commit 5060127

Please sign in to comment.