| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html lang="en"> | 2 <html lang="en"> |
| 3 <head> | 3 <head> |
| 4 </head> | 4 </head> |
| 5 <body> | 5 <body> |
| 6 <video></video> | 6 <video></video> |
| 7 <p>Test Encrypted Media extension of HTMLMediaElement <em>canPlayType()<
/em> method.</p> | 7 <p>Test Encrypted Media extension of HTMLMediaElement <em>canPlayType()<
/em> method.</p> |
| 8 <p>The test is designed to pass with any implementation regardless of su
pported media types and relies on the expected log to detect the expected result
s for some types. | 8 <p>The test is designed to pass with any implementation regardless of su
pported media types and relies on the expected log to detect the expected result
s for some types. |
| 9 To get sufficient coverage, it is important that an implementation su
pport clearkey encryption of at least one of the types below.</p> | 9 To get sufficient coverage, it is important that an implementation su
pport clearkey encryption of at least one of the types below.</p> |
| 10 | 10 |
| 11 <script src=../video-test.js></script> | 11 <script src=../video-test.js></script> |
| 12 <script> | 12 <script> |
| 13 video = mediaElement = document.getElementsByTagName('video')[0]; | 13 video = mediaElement = document.getElementsByTagName('video')[0]; |
| 14 | 14 |
| 15 consoleWrite("Always return the empty string for no type."); | |
| 16 testExpected("video.canPlayType()", ""); | |
| 17 | |
| 18 consoleWrite("<br>Always return the empty string for an empty type."
); | 15 consoleWrite("<br>Always return the empty string for an empty type."
); |
| 19 testExpected("video.canPlayType('')", ""); | 16 testExpected("video.canPlayType('')", ""); |
| 20 testExpected("video.canPlayType('', '')", ""); | 17 testExpected("video.canPlayType('', '')", ""); |
| 21 testExpected("video.canPlayType('', null)", ""); | 18 testExpected("video.canPlayType('', null)", ""); |
| 22 testExpected("video.canPlayType('', undefined)", ""); | 19 testExpected("video.canPlayType('', undefined)", ""); |
| 23 testExpected("video.canPlayType('', 'webkit-org.w3.clearkey')", ""); | 20 testExpected("video.canPlayType('', 'webkit-org.w3.clearkey')", ""); |
| 24 testExpected("video.canPlayType('', 'WeBkIt-OrG.W3.ClEaRkEy')", ""); | 21 testExpected("video.canPlayType('', 'WeBkIt-OrG.W3.ClEaRkEy')", ""); |
| 25 testExpected("video.canPlayType('', 'com.example.invalid')", ""); | 22 testExpected("video.canPlayType('', 'com.example.invalid')", ""); |
| 26 | 23 |
| 27 consoleWrite("<br>Always return the empty string for when no contain
er is specified."); | 24 consoleWrite("<br>Always return the empty string for when no contain
er is specified."); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 testExpected("video.canPlayType('video/webm', undefined)", webmResul
t); | 84 testExpected("video.canPlayType('video/webm', undefined)", webmResul
t); |
| 88 consoleWrite("All implementations that support WebM and Encrypted Me
dia support encrypted WebM."); | 85 consoleWrite("All implementations that support WebM and Encrypted Me
dia support encrypted WebM."); |
| 89 testExpected("video.canPlayType('video/webm', 'webkit-org.w3.clearke
y')", webmResult); | 86 testExpected("video.canPlayType('video/webm', 'webkit-org.w3.clearke
y')", webmResult); |
| 90 testExpected("video.canPlayType('video/webm', 'WeBkIt-OrG.W3.ClEaRkE
y')", webmResult); | 87 testExpected("video.canPlayType('video/webm', 'WeBkIt-OrG.W3.ClEaRkE
y')", webmResult); |
| 91 testExpected("video.canPlayType('video/webm', 'com.example.invalid')
", ""); | 88 testExpected("video.canPlayType('video/webm', 'com.example.invalid')
", ""); |
| 92 | 89 |
| 93 endTest(); | 90 endTest(); |
| 94 </script> | 91 </script> |
| 95 </body> | 92 </body> |
| 96 </html> | 93 </html> |
| OLD | NEW |