OLD | NEW |
1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>'abort' event test</title> | 4 <title>'abort' event test</title> |
5 <script src=../../media-resources/media-file.js></script> | 5 <script src=../../media-resources/media-file.js></script> |
| 6 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 7 (Please avoid writing new tests using video-test.js) --> |
6 <script src=../../media-resources/video-test.js></script> | 8 <script src=../../media-resources/video-test.js></script> |
7 <script> | 9 <script> |
8 var didLoad = false; | 10 var didLoad = false; |
9 | 11 |
10 function loadstart() | 12 function loadstart() |
11 { | 13 { |
12 consoleWrite("<br><b><em>'loadstart'</em> event</b>"); | 14 consoleWrite("<br><b><em>'loadstart'</em> event</b>"); |
13 testExpected("video.error", null); | 15 testExpected("video.error", null); |
14 | 16 |
15 if (didLoad) | 17 if (didLoad) |
16 return; | 18 return; |
17 didLoad = true; | 19 didLoad = true; |
18 | 20 |
19 // Force the element to reload, while the current movie is still
loading, | 21 // Force the element to reload, while the current movie is still
loading, |
20 // this should generate an 'abort' event | 22 // this should generate an 'abort' event |
21 run("video.load()"); | 23 run("video.load()"); |
22 } | 24 } |
23 | 25 |
24 function abort() | 26 function abort() |
25 { | 27 { |
26 consoleWrite("<br><b><em>'abort'</em> event</b>"); | 28 consoleWrite("<br><b><em>'abort'</em> event</b>"); |
27 testExpected("video.error", null); | 29 testExpected("video.error", null); |
(...skipping 28 matching lines...) Expand all Loading... |
56 </head> | 58 </head> |
57 | 59 |
58 <body onload="start()"> | 60 <body onload="start()"> |
59 <video controls | 61 <video controls |
60 onloadstart="loadstart()" | 62 onloadstart="loadstart()" |
61 onabort="abort()" | 63 onabort="abort()" |
62 oncanplaythrough="canplaythrough()" | 64 oncanplaythrough="canplaythrough()" |
63 ></video> | 65 ></video> |
64 </body> | 66 </body> |
65 </html> | 67 </html> |
OLD | NEW |