WebCore:
[WebKit-https.git] / LayoutTests / media / video-loopstart.html
1 <video playcount=2 loopstart=1s></video>
2 <p>Test that playing video rewinds to time specified by the loopstart attribute when it loops.</p>
3 <script src=video-test.js></script>
4 <script>
5 test("video.loopStart==1.0");
6 waitForEvent('load', function () {
7     waitForEvent('timeupdate', function () {
8         failTestIn(1000);
9         if (video.currentLoop == 1) {
10             test("video.currentLoop == 1");
11             test("video.currentTime.toFixed(1) == 1.0");
12             endTest();
13         }
14     });
15     video.currentTime = video.duration - 0.2;
16 });
17 video.src = "content/test.mp4";
18 run("video.play()");
19 </script>