| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Test that stalling very early, while loading meta-data, stops delaying th
e load event.</title> | 2 <title>Test that stalling very early, while loading meta-data, stops delaying th
e load event.</title> |
| 3 <script src="../resources/testharness.js"></script> | 3 <script src="../resources/testharness.js"></script> |
| 4 <script src="../resources/testharnessreport.js"></script> | 4 <script src="../resources/testharnessreport.js"></script> |
| 5 <script src="../../media-resources/media-file.js"></script> | 5 <script src="../../media-resources/media-file.js"></script> |
| 6 <video></video> | 6 <video></video> |
| 7 <script> | 7 <script> |
| 8 async_test(function(t) { | 8 async_test(function(t) { |
| 9 var video = document.querySelector("video"); | 9 var video = document.querySelector("video"); |
| 10 | 10 |
| 11 var expectedEvents = ["loadstart", "stalled"]; | 11 var expectedEvents = ["loadstart", "stalled"]; |
| 12 var watcher = new EventWatcher(t, video, expectedEvents); | 12 var watcher = new EventWatcher(t, video, expectedEvents); |
| 13 watcher.wait_for(expectedEvents).then(t.step_func(function() { | 13 watcher.wait_for(expectedEvents).then(t.step_func(function() { |
| 14 // We want to make sure the onload event fires. | 14 // We want to make sure the onload event fires. |
| 15 window.onload = t.step_func_done(); | 15 window.onload = t.step_func_done(); |
| 16 })); | 16 })); |
| 17 | 17 |
| 18 // Find a supported media file. | 18 // Find a supported media file. |
| 19 var mediaFile = findMediaFile("video", "content/test"); | 19 var mediaFile = findMediaFile("video", "content/test"); |
| 20 var mimeType = mimeTypeForFile(mediaFile); | 20 var mimeType = mimeTypeForFile(mediaFile); |
| 21 | 21 |
| 22 // Load should stall very early in the loading process. | 22 // Load should stall very early in the loading process. |
| 23 video.src = "http://127.0.0.1:8000/resources/load-and-stall.cgi?name=../../.
./media/" + mediaFile + "&mimeType=" + mimeType + "&stallAt=1&stallFor=4"; | 23 video.src = "http://127.0.0.1:8000/resources/load-and-stall.php?name=../../.
./media/" + mediaFile + "&mimeType=" + mimeType + "&stallAt=1&stallFor=4"; |
| 24 }); | 24 }); |
| 25 </script> | 25 </script> |
| OLD | NEW |