3 <script src=media-file.js></script>
5 function toggleDisplay()
7 var video = document.getElementById('vid');
8 if (video.style.display == "none") {
9 video.style.display = "inline-block";
10 video.addEventListener("seeked", done);
11 video.currentTime = 0; // so the snapshot always has the same frame
13 video.style.display = "none";
17 if (window.testRunner)
18 testRunner.waitUntilDone();
19 setSrcById('vid', findMediaFile('video', 'content/test'));
20 var video = document.getElementById('vid');
21 video.addEventListener("canplaythrough", test2);
31 if (window.testRunner)
32 testRunner.notifyDone();
36 <body onload="test()">
37 This tests that toggling the display property won't make the controls disappear.<br>
38 <video id="vid" controls></video>