blob: 2307eec17d3095c06e5221f23cf8437c21b0a9a7 [file] [log] [blame]
<html>
<body>
<video controls></video>
<p>Test a delay in playing the movie results in a canPlay event.</p>
<script src=media-file.js></script>
<!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
(Please avoid writing new tests using video-test.js) -->
<script src=video-test.js></script>
<script>
waitForEventOnce('canplaythrough',
function () {
waitForEventAndEnd('ended');
testExpected("video.currentTime", 0);
run("video.currentTime = video.duration - 0.2");
});
waitForEvent('seeked',
function () {
setTimeout(function() {
run("video.play()");
}, 400);
});
video.src = findMediaFile("video", "content/test");
</script>
</body>
</html>