Chromium Code Reviews| Index: LayoutTests/media/video-preload-none-no-stalled-event.html |
| diff --git a/LayoutTests/media/video-preload-none-no-stalled-event.html b/LayoutTests/media/video-preload-none-no-stalled-event.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..80257120e01187b10282fc55dfc037a7dad1529c |
| --- /dev/null |
| +++ b/LayoutTests/media/video-preload-none-no-stalled-event.html |
| @@ -0,0 +1,23 @@ |
| +<!DOCTYPE html> |
| +<script src=media-file.js></script> |
| +<script src=video-test.js></script> |
| +<script> |
| +function runTest() |
| +{ |
| + findMediaElement(); |
| + |
| + waitForEvent("suspend"); |
| + waitForEventAndFail("stalled"); |
| + consoleWrite(""); |
| + |
| + video.src = findMediaFile("video", "content/test"); |
| + |
| + // Give the progress timer enoug time to fire a 'stalled' event. |
|
acolwell GONE FROM CHROMIUM
2014/06/09 17:54:17
nit: s/enoug/enough/
|
| + // (3s timeout + 0.5s slack) |
| + setTimeout(endTest, 3000 + 500); |
|
acolwell GONE FROM CHROMIUM
2014/06/09 17:54:17
This seems brittle. How about using waitForEventAn
fs
2014/06/10 12:36:24
SGTM. Done.
|
| +} |
| +</script> |
| +<body onload="runTest()"> |
| + <p>Test to see if a media element with preload=none dispatches a 'stalled' event.</p> |
| + <video preload=none></video> |
| +</body> |