web-platform-tests / wpt

Test suites for Web platform specs — including WHATWG, W3C, and others
https://web-platform-tests.org/
Other
4.89k stars 3.06k forks source link

media-source isTypeSupported test problems #1386

Open cconcolato opened 9 years ago

cconcolato commented 9 years ago

I noticed the following problems with isTypeSupported tests. Don't know if/how to report that using Critic.

"Test invalid MIME format" https://github.com/w3c/web-platform-tests/blob/master/media-source/mediasource-is-type-supported.html#L23-L33

"Test invalid mismatch between major type and codec ID" https://github.com/w3c/web-platform-tests/blob/master/media-source/mediasource-is-type-supported.html#L35-L38 The term "codec ID" should be replaced by "codecs parameter". The notion of "mismatch" is not defined in the spec. This is related to the MIME types of the associated segment formats. It's not really up to MSE to test that. If we wanted to test that, there are many more tests to be added: for instance, it misses text tracks and associated mismatch. I suggest removing this subtest.

"Test invalid mismatch between minor type and codec ID" Same remark for "codec ID" and the definition of "mismatch". There are people working on the carriage of opus in mp4 so the notion of mismatch is moving. Similarly, 'audio/mp4;codecs="vorbis"' might be valid in the future. The question is why test such mismatch? The MIME type is not invalid. It may not be supported by an implementation but that's not a spec test. I suggest removing this subtest.

"Test invalid codec ID" Same remark as above for the term "codec ID" But this subtest is more a test for the ISOBMFF byte stream specification than for MSE. We could move them to a is-type-supported-isobmff.html test. A side question is: how can a Web app test for a class of codecs, such as all "avc1" configurations.

"Test valid MP4 type" Again these subtests are more related to the testing of the ISOBMFF spec than the MSE spec. There are many more codecs value that could be tested: "wvtt" for WebVTT in MP4, "stpp" for XML subtitles, "tx3g" for 3GPP timed text, ... and all formats defined at http://www.mp4ra.org/codecs

Also these tests don't test:

I can prepare a PR with the agreeable changes if needed.

Ms2ger commented 9 years ago

Please do.

wolenetz commented 8 years ago

See https://github.com/w3c/web-platform-tests/pull/1405#issuecomment-243477933 Some improvements (like invalid types for any browser) would still be ok for V1.