OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <body> | 3 <body> |
4 <p>Test that no timeupdate event fires during loading.</p> | 4 <p>Test that no timeupdate event fires during loading.</p> |
5 <video></video> | 5 <video></video> |
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 waitForEvent("loadstart"); | 11 waitForEvent("loadstart"); |
12 waitForEvent("loadedmetadata"); | 12 waitForEvent("loadedmetadata"); |
13 waitForEvent("loadeddata"); | 13 waitForEvent("loadeddata"); |
14 waitForEvent("canplay"); | 14 waitForEvent("canplay"); |
15 waitForEvent("canplaythrough", function() | 15 waitForEvent("canplaythrough", function() |
16 { | 16 { |
17 // Let pending async events fire before ending the test. | 17 // Let pending async events fire before ending the test. |
18 window.setTimeout(function() { endTest(); }, 0); | 18 window.setTimeout(function() { endTest(); }, 0); |
19 }); | 19 }); |
20 waitForEventAndFail("timeupdate"); | 20 waitForEventAndFail("timeupdate"); |
21 | 21 |
22 video.src = findMediaFile("video", "content/test"); | 22 video.src = findMediaFile("video", "content/test"); |
23 </script> | 23 </script> |
24 </body> | 24 </body> |
25 </html> | 25 </html> |
OLD | NEW |