blob: a4870cdaaa8dbebfeed4f87ee8cfc1354a3d3643 [file] [log] [blame]
jer.noble@apple.com9cb80de2014-06-24 00:08:25 +00001<!doctype html>
2<html>
3<head>
4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
6 <script>
7 function runTest()
8 {
9 findMediaElement();
10 waitForEvent('canplaythrough', canplaythrough);
11 video.src = findMediaFile('video', 'content/test');
12 }
13
14 function canplaythrough()
15 {
16 waitForEventOnce('seeked', seeked );
17 run('video.currentTime = 2');
18 run('video.currentTime = 0.5');
19 consoleWrite('');
20 }
21
22 function seeked()
23 {
24 testExpected('video.currentTime', 0.5);
25 waitForEventAndFail('seeked');
26 waitForEventAndEnd('play');
27 run('video.play()');
28 }
29 </script>
30</head>
31<body onload='runTest()'>
32 <p>Test that seeking twice in the same run loop will cancel the first seek.
33 </p>
34 <video controls></video>
35</body>
36</html>