blob: dad857bb417de04a8c90f02ce6d481920e0a2493 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src=media-file.js></script>
<script src=video-test.js></script>
<script>
function runTest() {
findMediaElement();
run('video.src = findMediaFile("audio", "content/silence")');
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()");
}
</script>
</head>
<body onload="runTest()">
<p>Test that calling play() and pause() on a video element with audio source triggers play and pause events.</p>
<video controls></video>
</body>
</html>