WebCore:
[WebKit-https.git] / LayoutTests / media / video-display-toggle.html
1 <html>
2     <head>
3         <script>            
4             function toggleDisplay()
5             {
6                 var video = document.getElementById('vid');
7                 if (video.style.display == "none")
8                     video.style.display = "inline-block";
9                 else
10                     video.style.display = "none";
11                 
12             }
13             function test()
14             {
15                 if (window.layoutTestController)
16                     layoutTestController.waitUntilDone();
17                 document.getElementById('vid').addEventListener("load", test2);    
18             }
19             function test2()
20             {
21                 toggleDisplay();
22                 toggleDisplay();
23
24                 if (window.layoutTestController)
25                     layoutTestController.notifyDone(); 
26             }
27         </script>
28     </head>
29     <body onload="test()">
30         This tests that toggling the display property won't make the controls disappear.<br>
31         <video id="vid" controls src="content/test.mp4"></video>
32     </body>
33 </html>
34