upload tizen1.0 source
[framework/web/webkit-efl.git] / LayoutTests / fullscreen / video-controls-override.html
1 <body>
2     <p>This tests that the video element's "controls" attribute is overridden in full screen mode, and that the controls are correctly hidden upon exiting full screen.  Press any key to continue.</p>
3     <video id="video" width="300"></video>
4     <script src="full-screen-test.js"></script>
5     <script>
6         var callback;
7         var shadowRoot;
8         var panel;
9
10         var fullscreenChanged = function(event)
11         {
12             if (callback)
13                 callback(event)
14         };
15         waitForEvent(document, 'webkitfullscreenchange', fullscreenChanged);
16
17         var video = document.getElementById('video');
18
19         var videoEnteredFullScreen = function() {
20             if (window.internals) {
21                 testExpected("shadowRoot = internals.shadowRoot(video)", null, "!=");
22                 testExpected("panel = shadowRoot.firstChild.firstChild", null, "!=");
23                 testExpected("internals.shadowPseudoId(panel)", "-webkit-media-controls-panel");
24                 testExpected("document.defaultView.getComputedStyle(panel)['display']", 'none', "!=");
25                 testExpected("document.defaultView.getComputedStyle(panel)['height']", '48px');
26             }
27             else
28                 logResult(false, "window.internals == undefined");
29             
30             callback = cancelledFullScreen;
31             document.webkitCancelFullScreen();
32         };
33
34         var cancelledFullScreen = function() {
35             if (window.layoutTestController)
36                 testExpected("document.defaultView.getComputedStyle(panel)['display']", 'none');
37             else
38                 logResult(false, "window.layoutTestController == undefined");
39
40             endTest();
41         };
42
43         callback = videoEnteredFullScreen;
44         runWithKeyDown(function(){video.webkitRequestFullScreen()});
45     </script>
46 </body>