blob: f57cab45dcfc299da8f39f921fc9c6cd07f7d3c1 [file] [log] [blame]
<video playcount=2 controls></video>
<p>Test that playing video rewinds to time specified by the loopStart DOM attribute when it loops.</p>
<script src=video-test.js></script>
<script>
video.loopStart = 1.0;
test("video.loopStart==1.0");
test("video.getAttribute('loopstart') == '1s'");
waitForEvent('load', function () {
waitForEvent('timeupdate', function () {
failTestIn(1000);
if (video.currentLoop == 1) {
test("video.currentLoop == 1");
test("video.currentTime.toFixed(1) == 1.0");
endTest();
}
});
video.currentTime = video.duration - 0.2;
});
video.src = "content/test.mp4";
run("video.play()");
</script>