OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <title>Test that seeking attribute is true immediately after a seek | |
5 to the current position, and goes back to false when the seek comple
tes.</title> | |
6 | |
7 <script src="media-file.js"></script> | |
8 <script src="video-test.js"></script> | |
9 <script> | |
10 var video; | |
11 var seekedCount = 0; | |
12 var seekTime = 1; | |
13 | |
14 function onload() | |
15 { | |
16 video = document.querySelector("video"); | |
17 video.src = findMediaFile("video", "content/test"); | |
18 waitForEventOnce('loadedmetadata', loadedmetadata); | |
19 waitForEvent('seeking'); | |
20 waitForEvent('timeupdate'); | |
21 waitForEvent('seeked', seeked); | |
22 } | |
23 | |
24 function loadedmetadata() | |
25 { | |
26 run("video.currentTime = seekTime"); | |
27 testExpected("video.seeking", true); | |
28 consoleWrite(""); | |
29 } | |
30 | |
31 function seeked() | |
32 { | |
33 ++seekedCount; | |
34 consoleWrite(""); | |
35 | |
36 testExpected("video.seeking", false); | |
37 testExpected("video.currentTime", seekTime); | |
38 | |
39 if (seekedCount == 2) { | |
40 endTest(); | |
41 return; | |
42 } | |
43 | |
44 run("video.currentTime = seekTime"); | |
45 testExpected("video.seeking", true); | |
46 | |
47 consoleWrite(""); | |
48 } | |
49 </script> | |
50 </head> | |
51 <body onload="onload()"> | |
52 <p>Test that seeking attribute is true immediately after a seek | |
53 to the current position, and goes back to false when the seek completes.
</p> | |
54 <video></video> | |
55 </body> | |
56 </html> | |
OLD | NEW |