OLD | NEW |
1 <html> | 1 <html> |
2 <body> | 2 <body> |
3 | 3 |
4 <video controls></video> | 4 <video controls></video> |
5 <p>Test that play() from EMPTY network state triggers load() and async play
event.</p> | 5 <p>Test that play() from EMPTY network state triggers load() and async play
event.</p> |
6 <script src=media-file.js></script> | 6 <script src=media-file.js></script> |
7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 7 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 |
8 (Please avoid writing new tests using video-test.js) --> | 8 (Please avoid writing new tests using video-test.js) --> |
9 <script src=video-test.js></script> | 9 <script src=video-test.js></script> |
10 <script> | 10 <script> |
11 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY); | 11 testExpected("video.networkState", HTMLMediaElement.NETWORK_EMPTY); |
12 | 12 |
13 waitForEvent("loadstart"); | 13 waitForEvent("loadstart"); |
14 waitForEvent("ratechange"); | 14 waitForEvent("ratechange"); |
15 waitForEvent("waiting"); | 15 waitForEvent("waiting"); |
16 waitForEvent("ratechange"); | 16 waitForEvent("ratechange"); |
17 waitForEvent("durationchange"); | 17 waitForEvent("durationchange"); |
18 waitForEvent("loadedmetadata"); | 18 waitForEvent("loadedmetadata"); |
19 waitForEvent("loadeddata"); | 19 waitForEvent("loadeddata"); |
20 waitForEvent("canplay"); | 20 waitForEvent("canplay"); |
21 waitForEvent("play"); | 21 waitForEvent("play"); |
22 | 22 |
23 waitForEvent('playing', function () { testExpected("video.paused", false
); endTest(); } ); | 23 waitForEvent('playing', function () { testExpected("video.paused", false
); endTest(); } ); |
24 | 24 |
25 video.src = findMediaFile("video", "content/test"); | 25 video.src = findMediaFile("video", "content/test"); |
26 run("video.play()"); | 26 run("video.play()"); |
27 consoleWrite("SCRIPT DONE"); | 27 consoleWrite("SCRIPT DONE"); |
28 </script> | 28 </script> |
29 | 29 |
30 </body> | 30 </body> |
31 </html> | 31 </html> |
OLD | NEW |