| <!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="badcontent"')", ""); |
| |
| endTest(); |
| } |
| </script> |
| </head> |
| <body onload="start()"> |
| <video controls></video> |
| <p>Test HTMLMediaElement <em>canPlayType()</em> method.</p> |
| </body> |
| </html> |