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