OLD | NEW |
1 <video></video> | 1 <video></video> |
2 <p>Test that stalling very early, while loading meta-data, stops delaying the lo
ad event.</p> | 2 <p>Test that stalling very early, while loading meta-data, stops delaying the lo
ad event.</p> |
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 | 8 |
9 // Expected events. | 9 // Expected events. |
10 waitForEvent("loadstart"); | 10 waitForEvent("loadstart"); |
11 waitForEvent("stalled"); | 11 waitForEvent("stalled"); |
12 waitForEvent("suspend"); | 12 waitForEvent("suspend"); |
13 | 13 |
14 // We want to make sure the onload event fires. | 14 // We want to make sure the onload event fires. |
15 window.onload = function() { | 15 window.onload = function() { |
16 consoleWrite("EVENT(window.onload)"); | 16 consoleWrite("EVENT(window.onload)"); |
17 endTest(); | 17 endTest(); |
18 }; | 18 }; |
19 | 19 |
20 // Find a supported media file. | 20 // Find a supported media file. |
21 var mediaFile = findMediaFile("video", "content/test"); | 21 var mediaFile = findMediaFile("video", "content/test"); |
22 var mimeType = mimeTypeForFile(mediaFile); | 22 var mimeType = mimeTypeForFile(mediaFile); |
23 | 23 |
24 // Load should stall very early in the loading process. | 24 // Load should stall very early in the loading process. |
25 video.src = "http://127.0.0.1:8000/resources/load-and-stall.cgi?name=../../.
./media/" + mediaFile + "&mimeType=" + mimeType + "&stallAt=1&stallFor=4"; | 25 video.src = "http://127.0.0.1:8000/resources/load-and-stall.cgi?name=../../.
./media/" + mediaFile + "&mimeType=" + mimeType + "&stallAt=1&stallFor=4"; |
26 | 26 |
27 </script> | 27 </script> |
OLD | NEW |