Commit 918a76c8 authored by Chris Cunningham's avatar Chris Cunningham Committed by Commit Bot

Delete ancient media canPlayType tests, update WPT version.

The deleted tests are covered by the remaining
wpt/html/semantics/embedded-content/media-elements/mime-types/canPlayType.html

TEST: Pass canPlayType.html WPT test.
Change-Id: I888c725194ae9fd4007e140f07f0639eb69495c1
Reviewed-on: https://chromium-review.googlesource.com/879138Reviewed-by: default avatarMatthew Wolenetz <wolenetz@chromium.org>
Commit-Queue: Chrome Cunningham <chcunningham@chromium.org>
Cr-Commit-Position: refs/heads/master@{#531371}
parent 6c602d4e
This is a testharness.js-based test.
Found 59 tests; 46 PASS, 13 FAIL, 0 TIMEOUT, 0 NOTRUN.
PASS utility code
PASS application/octet-stream
PASS video/x-new-fictional-format
PASS application/octet-stream not supported
PASS fictional formats and codecs not supported
FAIL audio/mp4 (optional) assert_equals: audio/mp4 expected "maybe" but got ""
FAIL audio/mp4; codecs="mp4a.40.2" (optional) assert_equals: audio/mp4; codecs="mp4a.40.2" expected "probably" but got ""
PASS audio/mp4 with bogus codec
......
......@@ -2,8 +2,13 @@
<title>canPlayType</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<audio id="audio"></audio>
<video id="video"></video>
<div id="log"></div>
<script>
let VIDEO_ELEM = document.getElementById('video');
let AUDIO_ELEM = document.getElementById('audio');
function t(type, expected) {
assert_equals(canPlayType(type), expected, type);
}
......@@ -22,12 +27,13 @@ test(function() {
}, 'utility code');
function canPlayType(type) {
var canPlay = document.createElement('audio').canPlayType(type);
assert_equals(canPlay, document.createElement('video').canPlayType(type),
let audioCanPlay = AUDIO_ELEM.canPlayType(type);
let videoCanPlay = VIDEO_ELEM.canPlayType(type);
assert_equals(audioCanPlay, videoCanPlay,
'audio.canPlayType() and video.canPlayType() agree');
assert_in_array(canPlay, ['', 'maybe', 'probably'],
assert_in_array(audioCanPlay, ['', 'maybe', 'probably'],
'return value is one of "", "maybe" and "probably"');
return canPlay;
return audioCanPlay;
}
test(function() {
......@@ -37,20 +43,22 @@ test(function() {
t('application/octet-stream; codecs="mp4a.40.2"', '');
t('application/octet-stream; codecs="theora, vorbis"', '');
t('application/octet-stream; codecs="avc1.42E01E, mp4a.40.2"', '');
}, 'application/octet-stream');
}, 'application/octet-stream not supported');
test(function() {
t('application/marks-fantasmagorical-format', '');
t('video/x-new-fictional-format', '');
t('video/x-new-fictional-format;codecs="kittens,bunnies"', '');
}, 'video/x-new-fictional-format');
}, 'fictional formats and codecs not supported');
function type_codecs_test(type, audioCodecs, videoCodecs) {
var typeSupported = false;
var codecSupported = false;
// Test 'type' without codecs.
// Spec: Generally, a user agent should never return "probably" for a type
// that allows the codecs parameter if that parameter is not present.
test(function() {
// Spec: Generally, a user agent should never return "probably" for a type
// that allows the codecs parameter if that parameter is not present.
t(type, 'maybe');
t(type + ';', 'maybe');
t(type + ';codecs', 'maybe');
......@@ -66,9 +74,11 @@ function type_codecs_test(type, audioCodecs, videoCodecs) {
}, typeWithCodec + ' (optional)');
}
// Test each audio and video codec separately.
audioCodecs.forEach(test_codec);
videoCodecs.forEach(test_codec);
// Test different pairings and orderings of audio+video codecs.
if (audioCodecs.length > 0 && videoCodecs.length > 0) {
test(function() {
audioCodecs.forEach(function(ac) {
......
audio.canPlayType() - application/octet-stream must always return the empty string
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS true is true
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>audio.canPlayType() - application/octet-stream must always return the empty string</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<audio id="a">
</audio>
<div id="log"></div>
<script>
test(function() {
assert_true(
document.getElementById("a").canPlayType("application/octet-stream") == "",
"audioElement.canPlayType('application/octet-stream') should return the empty string");
});
</script>
</body>
</html>
audio.canPlayType() - can never play application/octet-stream with a codecs parameter
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "" is ""
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>audio.canPlayType() - can never play application/octet-stream with a codecs parameter</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<audio id="a">
</audio>
<div id="log"></div>
<script>
test(function() {
assert_equals(
document.getElementById("a").canPlayType('application/octet-stream; codecs="vorbis"'),
"",
"audioElement.canPlayType('application/octet-stream; codecs=...') should always return the empty string");
});
</script>
</body>
</html>
audio.canPlayType() - can never play application/octet-stream with a codecs parameter
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "" is ""
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>audio.canPlayType() - can never play application/octet-stream with a codecs parameter</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#a-type-that-the-user-agent-knows-it-cannot-render">spec reference</a></p>
<audio id="a">
</audio>
<div id="log"></div>
<script>
test(function() {
assert_equals(
document.getElementById("a").canPlayType('application/octet-stream; codecs="mp4a.40.2"'),
"",
"audioElement.canPlayType('application/octet-stream; codecs=...') should always return the empty string");
});
</script>
</body>
</html>
audio.canPlayType() - bogus format
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "" is ""
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>audio.canPlayType() - bogus format</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<audio id="a">
</audio>
<div id="log"></div>
<script>
test(function() {
assert_equals(
document.getElementById("a").canPlayType("application/marks-fantasmagorical-format"),
"",
"audioElement.canPlayType() should return the empty string on a bogus format");
});
</script>
</body>
</html>
audio.canPlayType() - existence of method
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS true is true
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>audio.canPlayType() - existence of method</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<audio id="a">
</audio>
<div id="log"></div>
<script>
test(function() {
assert_true(
!!document.getElementById("a").canPlayType,
"audioElement.canPlayType method exists");
});
</script>
</body>
</html>
audio.canPlayType() - supported format w/o codecs parameter
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "maybe" is "maybe"
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>audio.canPlayType() - supported format w/o codecs parameter</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<audio id="a">
</audio>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("a");
if (v.canPlayType('audio/ogg; codecs="vorbis"') == "probably") {
assert_equals(
v.canPlayType("audio/ogg"),
"maybe",
"audioElement.canPlayType() should return 'maybe' on supported format w/o codecs parameter");
}
});
</script>
</body>
</html>
audio.canPlayType() - supported format w/o codecs parameter
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>audio.canPlayType() - supported format w/o codecs parameter</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<audio id="a">
</audio>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("a");
if (v.canPlayType('audio/mp4; codecs="mp4a.40.2"') == "probably") {
assert_equals(
v.canPlayType("audio/mp4"),
"maybe",
"audioElement.canPlayType() should return 'maybe' on supported format w/o codecs parameter");
}
});
</script>
</body>
</html>
video.canPlayType() - application/octet-stream must always return the empty string
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS true is true
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - application/octet-stream must always return the empty string</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
assert_true(
document.getElementById("v").canPlayType("application/octet-stream") == "",
"videoElement.canPlayType('application/octet-stream') should return the empty string");
});
</script>
</body>
</html>
video.canPlayType() - can never play application/octet-stream with a codecs parameter
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "" is ""
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - can never play application/octet-stream with a codecs parameter</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
assert_equals(
document.getElementById("v").canPlayType('application/octet-stream; codecs="vp8, vorbis"'),
"",
"videoElement.canPlayType('application/octet-stream; codecs=...') should always return the empty string");
});
</script>
</body>
</html>
video.canPlayType() - can never play application/octet-stream with a codecs parameter
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "" is ""
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - can never play application/octet-stream with a codecs parameter</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#a-type-that-the-user-agent-knows-it-cannot-render">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
assert_equals(
document.getElementById("v").canPlayType('application/octet-stream; codecs="theora, vorbis"'),
"",
"videoElement.canPlayType('application/octet-stream; codecs=...') should always return the empty string");
});
</script>
</body>
</html>
video.canPlayType() - can never play application/octet-stream with a codecs parameter
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "" is ""
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - can never play application/octet-stream with a codecs parameter</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#a-type-that-the-user-agent-knows-it-cannot-render">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
assert_equals(
document.getElementById("v").canPlayType('application/octet-stream; codecs="avc1.42E01E, mp4a.40.2"'),
"",
"videoElement.canPlayType('application/octet-stream; codecs=...') should always return the empty string");
});
</script>
</body>
</html>
video.canPlayType() - bogus format
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "" is ""
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - bogus format</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
assert_equals(
document.getElementById("v").canPlayType("application/marks-fantasmagorical-format"),
"",
"videoElement.canPlayType() should return the empty string on a bogus format");
});
</script>
</body>
</html>
video.canPlayType() - codecs parameter order
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "probably" is "probably"
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - codecs parameter order</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
assert_equals(
v.canPlayType('video/webm; codecs="vp8, vorbis"'),
v.canPlayType('video/webm; codecs="vorbis, vp8"'),
"order of codecs parameters should have no effect");
});
</script>
</body>
</html>
video.canPlayType() - codecs parameter order
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "probably" is "probably"
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - codecs parameter order</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
assert_equals(
v.canPlayType('video/ogg; codecs="theora, vorbis"'),
v.canPlayType('video/ogg; codecs="vorbis, theora"'),
"order of codecs parameters should have no effect");
});
</script>
</body>
</html>
video.canPlayType() - codecs parameter order
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "" is ""
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - codecs parameter order</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
assert_equals(
v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"'),
v.canPlayType('video/mp4; codecs="mp4a.40.2, avc1.42E01E"'),
"order of codecs parameters should have no effect");
});
</script>
</body>
</html>
video.canPlayType() - existence of method
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS true is true
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - existence of method</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
assert_true(
"canPlayType" in document.getElementById("v"),
"videoElement.canPlayType method exists");
});
</script>
</body>
</html>
video.canPlayType() - supported format w/o codecs parameter
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "maybe" is "maybe"
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - supported format w/o codecs parameter</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
if (v.canPlayType('video/webm; codecs="vp8, vorbis"') == "probably") {
assert_equals(
v.canPlayType("video/webm"),
"maybe",
"videoElement.canPlayType() should return 'maybe' on supported format w/o codecs parameter");
}
});
</script>
</body>
</html>
video.canPlayType() - supported format w/o codecs parameter
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "maybe" is "maybe"
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - supported format w/o codecs parameter</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
if (v.canPlayType('video/ogg; codecs="theora"') == "probably") {
assert_equals(
v.canPlayType("video/ogg"),
"maybe",
"videoElement.canPlayType() should return 'maybe' on supported format w/o codecs parameter");
}
});
</script>
</body>
</html>
video.canPlayType() - supported format w/o codecs parameter
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - supported format w/o codecs parameter</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#dom-navigator-canplaytype">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
if (v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"') == "probably") {
assert_equals(
v.canPlayType("video/mp4"),
"maybe",
"videoElement.canPlayType() should return 'maybe' on supported format w/o codecs parameter");
}
});
</script>
</body>
</html>
video.canPlayType() - codecs parameter logic
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "probably" is "probably"
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - codecs parameter logic</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
if (v.canPlayType('video/webm; codecs="vp8, vorbis"') == "probably") {
assert_equals(
v.canPlayType('video/webm; codecs="vp8, vorbis"'),
v.canPlayType('video/webm; codecs="vp8"'),
"ability to play two codecs implies the ability to play one");
}
});
</script>
</body>
</html>
video.canPlayType() - codecs parameter logic
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "probably" is "probably"
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - codecs parameter logic</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
if (v.canPlayType('video/webm; codecs="vp8, vorbis"') == "probably") {
assert_equals(
v.canPlayType('video/webm; codecs="vp8, vorbis"'),
v.canPlayType('video/webm; codecs="vorbis"'),
"ability to play two codecs implies the ability to play one");
}
});
</script>
</body>
</html>
video.canPlayType() - codecs parameter logic
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "probably" is "probably"
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - codecs parameter logic</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
if (v.canPlayType('video/ogg; codecs="theora, vorbis"') == "probably") {
assert_equals(
v.canPlayType('video/ogg; codecs="theora, vorbis"'),
v.canPlayType('video/ogg; codecs="theora"'),
"ability to play two codecs implies the ability to play one");
}
});
</script>
</body>
</html>
video.canPlayType() - codecs parameter logic
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS "probably" is "probably"
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - codecs parameter logic</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
if (v.canPlayType('video/ogg; codecs="theora, vorbis"') == "probably") {
assert_equals(
v.canPlayType('video/ogg; codecs="theora, vorbis"'),
v.canPlayType('video/ogg; codecs="vorbis"'),
"ability to play two codecs implies the ability to play one");
}
});
</script>
</body>
</html>
video.canPlayType() - codecs parameter logic
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - codecs parameter logic</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
if (v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"') == "probably") {
assert_equals(
v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"'),
v.canPlayType('video/ogg; codecs="avc1.42E01E"'),
"ability to play two codecs implies the ability to play one");
}
});
</script>
</body>
</html>
video.canPlayType() - codecs parameter logic
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS successfullyParsed is true
TEST COMPLETE
spec reference
<!doctype html>
<html>
<head>
<title>video.canPlayType() - codecs parameter logic</title>
<script src="../../w3cwrapper.js"></script>
</head>
<body>
<p><a href="http://dev.w3.org/html5/spec/Overview.html#mime-types">spec reference</a></p>
<video id="v">
</video>
<div id="log"></div>
<script>
test(function() {
var v = document.getElementById("v");
if (v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"') == "probably") {
assert_equals(
v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"'),
v.canPlayType('video/ogg; codecs="mp4a.40.2"'),
"ability to play two codecs implies the ability to play one");
}
});
</script>
</body>
</html>
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment