OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src=media-file.js></script> | |
3 <script src=video-test.js></script> | |
4 <script> | |
5 function runTest() | |
6 { | |
7 findMediaElement(); | |
8 | |
9 waitForEvent("suspend"); | |
10 waitForEventAndFail("stalled"); | |
11 consoleWrite(""); | |
12 | |
13 video.src = findMediaFile("video", "content/test"); | |
14 | |
15 // 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/
| |
16 // (3s timeout + 0.5s slack) | |
17 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.
| |
18 } | |
19 </script> | |
20 <body onload="runTest()"> | |
21 <p>Test to see if a media element with preload=none dispatches a 'stalled' eve nt.</p> | |
22 <video preload=none></video> | |
23 </body> | |
OLD | NEW |