[ WebCodecs | AudioDecoder ] Test wants both the same configuration to be invalid and not supported: it can only be one or the other. #49636
Description
In
wpt/webcodecs/audio-decoder.https.any.js
Lines 55 to 60 in 1f7679a
It checks that a configuration using Opus with more than 2 channels and no description be considered invalid.
But in:
wpt/webcodecs/audio-decoder.https.any.js
Lines 152 to 165 in 1f7679a
It checks that a configuration using Opus with more than 2 channels and no description is not supported.
It can't be both.
Per spec https://w3c.github.io/webcodecs/#dom-audiodecoder-configure
"If config is not a valid AudioDecoderConfig, throw a TypeError."
So if we want a configuration using Opus with more than 2 channels and no description be considered as invalid, then configure
must throw with a TypeError when given that same configuration.
In the same line of thought,it would probably make sense to also check the Opus' description is greater than 10 bytes and make it be invalid otherwise.