| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <title>Test that stalled, timeupdate and waiting events are sent when media load
stalls in the middle.</title> | 2 <title>Test that stalled, timeupdate and waiting events are sent when media load
stalls in the middle.</title> |
| 3 <video id="test_video"></video> | 3 <video id="test_video"></video> |
| 4 <div id="log_console"></div> | 4 <div id="log_console"></div> |
| 5 <script src=../../media-resources/media-file.js></script> | 5 <script src=../../media-resources/media-file.js></script> |
| 6 <script src="/w3c/resources/testharness.js"></script> | 6 <script src="/w3c/resources/testharness.js"></script> |
| 7 <script src="/w3c/resources/testharnessreport.js"></script> | 7 <script src="/w3c/resources/testharnessreport.js"></script> |
| 8 <script> | 8 <script> |
| 9 async_test(t => { | 9 async_test(t => { |
| 10 let video = document.getElementById('test_video'); | 10 let video = document.getElementById('test_video'); |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 .then(() => playback_ew.wait_for('canplaythrough')).then(logEvent) | 124 .then(() => playback_ew.wait_for('canplaythrough')).then(logEvent) |
| 125 ])).then(t.step_func_done()); | 125 ])).then(t.step_func_done()); |
| 126 | 126 |
| 127 | 127 |
| 128 // Find a supported media file. | 128 // Find a supported media file. |
| 129 var mediaFile = findMediaFile("video", "content/test"); | 129 var mediaFile = findMediaFile("video", "content/test"); |
| 130 var mimeType = mimeTypeForFile(mediaFile); | 130 var mimeType = mimeTypeForFile(mediaFile); |
| 131 // URL will load part of the file, pause for 8 seconds, then load the rest. | 131 // URL will load part of the file, pause for 8 seconds, then load the rest. |
| 132 // The delay of 8 seconds is chosen to reduce flakiness in waiting for the | 132 // The delay of 8 seconds is chosen to reduce flakiness in waiting for the |
| 133 // stalled event, which should arrive after roughly 3 seconds of inactivity. | 133 // stalled event, which should arrive after roughly 3 seconds of inactivity. |
| 134 video.src = "http://127.0.0.1:8000/resources/load-and-stall.cgi?name=../../.
./media/" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000&stallFor=8"; | 134 video.src = "http://127.0.0.1:8000/resources/load-and-stall.php?name=../../.
./media/" + mediaFile + "&mimeType=" + mimeType + "&stallAt=100000&stallFor=8"; |
| 135 | 135 |
| 136 }, "Stalled download pauses playback. When download resumes playback continues.
Verify events and readyStates."); | 136 }, "Stalled download pauses playback. When download resumes playback continues.
Verify events and readyStates."); |
| 137 </script> | 137 </script> |
| OLD | NEW |