OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src=../../media-resources/media-file.js></script> | 3 <script src=../../media-resources/media-file.js></script> |
4 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 | 4 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956 |
5 (Please avoid writing new tests using video-test.js) --> | 5 (Please avoid writing new tests using video-test.js) --> |
6 <script src=../../media-resources/video-test.js></script> | 6 <script src=../../media-resources/video-test.js></script> |
7 <script> | 7 <script> |
8 function start() { | 8 function start() { |
9 findMediaElement(); | 9 findMediaElement(); |
10 | 10 |
11 var progressCount = 0; | 11 var progressCount = 0; |
12 | 12 |
13 // Make sure we've at least reached NETWORK_LOADING before waiting
for progress. | 13 // Make sure we've at least reached NETWORK_LOADING before waiting
for progress. |
14 waitForEvent('loadstart', function() { | 14 waitForEvent('loadstart', function() { |
15 waitForEventAndEnd('progress') | 15 waitForEventAndEnd('progress') |
16 } ); | 16 } ); |
17 | 17 |
18 var mediaFile = findMediaFile("video", "resources/test"); | 18 var mediaFile = findMediaFile("video", "resources/test"); |
19 video.src = "http://127.0.0.1:8000/" + mediaFile; | 19 video.src = "http://127.0.0.1:8000/" + mediaFile; |
20 run("video.play()"); | 20 run("video.play()"); |
21 } | 21 } |
22 </script> | 22 </script> |
23 </head> | 23 </head> |
24 <body onload="start()"> | 24 <body onload="start()"> |
25 <video></video> | 25 <video></video> |
26 <p>Test that at least one progress event is fired after starting to load t
he video.</p> | 26 <p>Test that at least one progress event is fired after starting to load t
he video.</p> |
27 </body> | 27 </body> |
28 </html> | 28 </html> |
OLD | NEW |