blob: 83aae3674380b67cf7cbc382d920b381ba0c2447 [file] [log] [blame]
<html>
<head>
<script src=media-file.js></script>
<script>
function toggleDisplay()
{
var video = document.getElementById('vid');
if (video.style.display == "none") {
video.style.display = "inline-block";
video.addEventListener("seeked", done);
video.currentTime = 0; // so the snapshot always has the same frame
} else
video.style.display = "none";
}
function test()
{
if (window.testRunner)
testRunner.waitUntilDone();
setSrcById('vid', findMediaFile('video', 'content/test'));
var video = document.getElementById('vid');
video.addEventListener("canplaythrough", test2);
video.load();
}
function test2()
{
toggleDisplay();
toggleDisplay();
}
function done()
{
if (window.testRunner)
testRunner.notifyDone();
}
</script>
</head>
<body onload="test()">
This tests that toggling the display property won't make the controls disappear.<br>
<video id="vid" controls></video>
</body>
</html>