WebCore:
[WebKit-https.git] / LayoutTests / media / video-dom-loopend.html
1 <video src=content/test.mp4 playcount=2></video>
2 <p>Test that video loops when time reaches the value specified by the loopEnd DOM attribute.</p>
3 <script src=video-test.js></script>
4 <script>
5 video.loopEnd=0.5;
6 test("video.loopEnd==0.5");
7 test("video.getAttribute('loopend') == '0.5s'");
8 setTimeout(function () { test("video.currentTime<=0.5"); }, 2000);
9 waitForEvent('timeupdate', function () {
10     if (video.currentLoop == 1) {
11         test("video.currentLoop == 1");
12         test("video.currentTime.toFixed(1) == 0");
13         endTest();
14     }
15 });
16 run("video.play()");
17 </script>