OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <title>Test HTMLMediaElement's "canPlayType" method with "application/octet-stre
am".</title> |
3 <head> | 3 <script src="../resources/testharness.js"></script> |
4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 | 4 <script src="../resources/testharnessreport.js"></script> |
5 (Please avoid writing new tests using video-test.js) --> | 5 <script> |
6 <script src="video-test.js"></script> | 6 function check_media_element_canplaytype(elementName) { |
7 <script> | 7 test(function() { |
8 function test() | 8 » var mediaElement = document.createElement(elementName); |
9 { | 9 // These tests should always pass as no platform |
10 testExpected("mediaElement.canPlayType('APPLICATION/octet-stream
')", ""); | 10 // should support "application/octet-stream". |
11 testExpected("mediaElement.canPlayType('application/octet-stream
;codecs=theora')", ""); | 11 assert_equals(mediaElement.canPlayType("APPLICATION/octet-stream"), ""); |
12 testExpected("mediaElement.canPlayType('application/octet-stream
;codecs=mp4')", ""); | 12 assert_equals(mediaElement.canPlayType("application/octet-stream;codecs=
theora"), ""); |
13 } | 13 assert_equals(mediaElement.canPlayType("application/octet-stream;codecs=
mp4"), ""); |
| 14 }, "check \"canPlayType\" method for " + elementName); |
| 15 } |
14 | 16 |
15 function start() | 17 check_media_element_canplaytype("audio"); |
16 { | 18 check_media_element_canplaytype("video"); |
17 consoleWrite("<em>++ Test with <video> element.</em>"); | 19 </script> |
18 mediaElement = document.getElementsByTagName('video')[0]; | |
19 test(); | |
20 | |
21 consoleWrite("<br><em>++ Test with <audio> element.</em>")
; | |
22 mediaElement = new Audio(); | |
23 test(); | |
24 | |
25 endTest(); | |
26 } | |
27 </script> | |
28 </head> | |
29 <body onload="start()"> | |
30 <video controls></video> | |
31 <p>Test HTMLMediaElement <em>canPlayType()</em> method with "application
/octet-stream".</p> | |
32 <p>These tests should always pass as no WebKit port should support "appl
ication/octet-stream".</p> | |
33 </body> | |
34 </html> | |
OLD | NEW |