blob: f5051f1c93b7b0f13b6a7d15fc46308ee752472a [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="video-test.js"></script>
<script>
function start() {
video = document.getElementsByTagName('video')[0];
testException("video.canPlayType()", "'TypeError: Not enough arguments'");
testExpected("video.canPlayType('video/')", "");
testExpected("video.canPlayType('video/blahblah')", "");
testExpected("video.canPlayType('video/blahblah; codecs=\"blah, , blah\"')", "");
testExpected("video.canPlayType('video/blahblah; codecs=blah')", "");
testExpected("video.canPlayType('video/blahblah; codecs=\"blah\"')", "");
testExpected("video.canPlayType('video/blahblah; codecs=\"badcontent')", "");
testExpected("video.canPlayType('video/blahblah; codecs=badcontent\"')", "");
testExpected("video.canPlayType('video/blahblah; codecs=&quot;badcontent&quot;')", "");
endTest();
}
</script>
</head>
<body onload="start()">
<video controls></video>
<p>Test HTMLMediaElement <em>canPlayType()</em> method.</p>
</body>
</html>