blob: 26a67c32704de1ab4f9a60aebbadf7d8f25c2601 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<!DOCTYPE html>
<!-- Copyright © 2018 Chromium authors and World Wide Web Consortium, (Massachusetts Institute of Technology, ERCIM, Keio University, Beihang). -->
<html>
<head>
<title>Exercise changeType for supported test types, using mime types WITH codecs (if applicable) for addSourceBuffer and changeType.</title>
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="mediasource-util.js"></script>
<script src="mediasource-changetype-util.js"></script>
</head>
<body>
<div id="log"></div>
<script>
function generateChangeTypeTests(audio_types, video_types) {
async_test((test) => {
assert_true(audio_types.length > 1, "Browser doesn't support at least 2 types of audio test media");
assert_true(video_types.length > 1, "Browser doesn't support at least 2 types of video test media");
test.done();
}, "Check if browser supports enough test media types");
// Generate audio-only changeType tests
for (let audio1 of audio_types) {
for (let audio2 of audio_types) {
mediaSourceChangeTypeTest(
audio1, audio2,
"Test audio-only changeType for " +
audio1.type + " <-> " + audio2.type);
}
}
// Generate video-only changeType tests
for (let video1 of video_types) {
for (let video2 of video_types) {
mediaSourceChangeTypeTest(
video1, video2,
"Test video-only changeType for " +
video1.type + " <-> " + video2.type);
}
}
}
findSupportedChangeTypeTestTypes(generateChangeTypeTests);
</script>
</body>
</html>
|