| 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 that the methods throw INVALID_STATE_ERR when the media element
has not loaded. canPlayType() never throws.</p> | 7 <p>Test that the methods throw INVALID_STATE_ERR when the media element
has not loaded. canPlayType() never throws.</p> |
| 8 | 8 |
| 9 <script src=../../media-file.js></script> | 9 <script src=../../media-file.js></script> |
| 10 <script src=../../video-test.js></script> | 10 <script src=../../video-test.js></script> |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 // Confirms the unloaded state. | 27 // Confirms the unloaded state. |
| 28 testExpected("video.networkState", video.NETWORK_EMPTY); | 28 testExpected("video.networkState", video.NETWORK_EMPTY); |
| 29 testExpected("video.currentSrc", ""); | 29 testExpected("video.currentSrc", ""); |
| 30 | 30 |
| 31 consoleWrite("No 'src'. Verify that all methods except canPlayType()
throw INVALID_STATE_ERR."); | 31 consoleWrite("No 'src'. Verify that all methods except canPlayType()
throw INVALID_STATE_ERR."); |
| 32 testDOMException("video.webkitGenerateKeyRequest('webkit-org.w3.clea
rkey')", "DOMException.INVALID_STATE_ERR"); | 32 testDOMException("video.webkitGenerateKeyRequest('webkit-org.w3.clea
rkey')", "DOMException.INVALID_STATE_ERR"); |
| 33 testDOMException("video.webkitAddKey('webkit-org.w3.clearkey', key)"
, "DOMException.INVALID_STATE_ERR"); | 33 testDOMException("video.webkitAddKey('webkit-org.w3.clearkey', key)"
, "DOMException.INVALID_STATE_ERR"); |
| 34 testDOMException("video.webkitCancelKeyRequest('webkit-org.w3.cleark
ey')", "DOMException.INVALID_STATE_ERR"); | 34 testDOMException("video.webkitCancelKeyRequest('webkit-org.w3.cleark
ey')", "DOMException.INVALID_STATE_ERR"); |
| 35 run("video.canPlayType('audio/wav', 'webkit-org.w3.clearkey')"); | 35 run("video.canPlayType('audio/wav', 'webkit-org.w3.clearkey')"); |
| 36 | 36 |
| 37 video.setAttribute("src", findMediaFile("video", "../content/test"))
; | 37 video.setAttribute("src", findMediaFile("video", "../../content/test
")); |
| 38 | 38 |
| 39 consoleWrite("<br>'src' has been set, but loading has not yet starte
d. Verify that all methods except canPlayType() throw INVALID_STATE_ERR."); | 39 consoleWrite("<br>'src' has been set, but loading has not yet starte
d. Verify that all methods except canPlayType() throw INVALID_STATE_ERR."); |
| 40 | 40 |
| 41 testExpected("video.networkState", video.NETWORK_NO_SOURCE); | 41 testExpected("video.networkState", video.NETWORK_NO_SOURCE); |
| 42 testExpected("video.currentSrc", ""); | 42 testExpected("video.currentSrc", ""); |
| 43 | 43 |
| 44 testDOMException("video.webkitGenerateKeyRequest('webkit-org.w3.clea
rkey')", "DOMException.INVALID_STATE_ERR"); | 44 testDOMException("video.webkitGenerateKeyRequest('webkit-org.w3.clea
rkey')", "DOMException.INVALID_STATE_ERR"); |
| 45 testDOMException("video.webkitAddKey('webkit-org.w3.clearkey', key)"
, "DOMException.INVALID_STATE_ERR"); | 45 testDOMException("video.webkitAddKey('webkit-org.w3.clearkey', key)"
, "DOMException.INVALID_STATE_ERR"); |
| 46 testDOMException("video.webkitCancelKeyRequest('webkit-org.w3.cleark
ey')", "DOMException.INVALID_STATE_ERR"); | 46 testDOMException("video.webkitCancelKeyRequest('webkit-org.w3.cleark
ey')", "DOMException.INVALID_STATE_ERR"); |
| 47 run("video.canPlayType('audio/wav', 'webkit-org.w3.clearkey')"); | 47 run("video.canPlayType('audio/wav', 'webkit-org.w3.clearkey')"); |
| 48 | 48 |
| 49 | 49 |
| 50 consoleWrite(""); | 50 consoleWrite(""); |
| 51 waitForEvent('loadstart', loadStarted); | 51 waitForEvent('loadstart', loadStarted); |
| 52 </script> | 52 </script> |
| 53 </body> | 53 </body> |
| 54 </html> | 54 </html> |
| OLD | NEW |