blob: e712544f4ad31165a9d7a50c4c2407fe96b484e6 [file] [log] [blame]
<video controls></video>
<p>Test that calling play() and pause() triggers async play, timeupdate and pause events.</p>
<script src=media-file.js></script>
<script src=video-test.js></script>
<script>
video.src = findMediaFile("video", "content/test");
waitForEvent("loadstart");
waitForEvent("ratechange");
waitForEvent("waiting");
waitForEvent("ratechange");
waitForEvent("durationchange");
waitForEvent("loadedmetadata");
waitForEvent("loadeddata");
waitForEvent("canplay");
waitForEvent("canplaythrough");
waitForEvent("play");
waitForEvent("timeupdate");
waitForEvent('pause', function () { testExpected("video.paused", true); endTest(); } );
run("handlePromise(video.play())");
run("video.pause()");
consoleWrite("SCRIPT DONE");
</script>