Skip to content

Commit

Permalink
webcodec support tests should fail if we can't tell
Browse files Browse the repository at this point in the history
  • Loading branch information
gsnedders committed Nov 17, 2022
1 parent 310ff51 commit 67eef80
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions webcodecs/audio-decoder.crossOriginIsolated.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function testSharedArrayBufferDescription(t, useView) {
const data = testData;

// Don't run test if the codec is not supported.
assert_equals("function", typeof AudioDecoder.isConfigSupported);
let supported = false;
return AudioDecoder
.isConfigSupported({
Expand Down
1 change: 1 addition & 0 deletions webcodecs/audioDecoder-codec-specific.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ promise_setup(async () => {
}[location.search];

// Don't run any tests if the codec is not supported.
assert_equals("function", typeof AudioDecoder.isConfigSupported);
let supported = false;
try {
const support = await AudioDecoder.isConfigSupported({
Expand Down
1 change: 1 addition & 0 deletions webcodecs/video-decoder.crossOriginIsolated.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ function testSharedArrayBufferDescription(t, useView) {
const data = testData;

// Don't run test if the codec is not supported.
assert_equals("function", typeof VideoDecoder.isConfigSupported);
let supported = false;
return VideoDecoder.isConfigSupported({codec: data.config.codec})
.catch(_ => {
Expand Down
1 change: 1 addition & 0 deletions webcodecs/video-encoder-utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
async function checkEncoderSupport(test, config) {
assert_equals("function", typeof VideoEncoder.isConfigSupported);
let supported = false;
try {
const support = await VideoEncoder.isConfigSupported(config);
Expand Down
1 change: 1 addition & 0 deletions webcodecs/videoDecoder-codec-specific.https.any.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ promise_setup(async () => {
}[location.search];

// Don't run any tests if the codec is not supported.
assert_equals("function", typeof VideoDecoder.isConfigSupported);
let supported = false;
try {
// TODO(sandersd): To properly support H.264 in AVC format, this should
Expand Down

0 comments on commit 67eef80

Please sign in to comment.