OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <title>video is not paused while looping</title> | |
3 <script src="../resources/testharness.js"></script> | |
4 <script src="../resources/testharnessreport.js"></script> | |
5 <script src="w3c-media-utils.js"></script> | |
6 <video controls loop></video> | |
7 <p>Test that video should not be in a paused state while looping.</p> | |
8 <script> | |
9 async_test(function(test) { | |
10 var video = document.querySelector('video'); | |
11 | |
12 // Seek to near the end. | |
13 video.onloadeddata = test.step_func(function() { | |
14 waitForEventAndRunStep('seeked', video, seeked, test); | |
15 video.currentTime = video.duration - 0.4; | |
16 }); | |
17 | |
18 video.src = 'content/test.mp4'; | |
19 | |
20 // Verify video is not paused. | |
21 function seeking() { | |
22 assert_equals(video.currentTime, 0, 'currentTime'); | |
DaleCurtis
2014/09/19 01:02:36
Hmm, this seems like it could be fragile. I'd jus
qinmin
2014/09/19 17:35:20
Done.
| |
23 assert_equals(video.paused, false, 'paused'); | |
24 test.done(); | |
25 } | |
26 | |
27 // Play the video and wait for playback to loop. | |
28 function seeked() { | |
29 waitForEventAndRunStep('seeking', video, seeking, test); | |
30 video.play(); | |
31 } | |
32 }); | |
33 </script> | |
OLD | NEW |