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 src=
"../media/media-controls.js"></script>
11 var fullscreenChanged = function(event
)
16 waitForEvent(document
, 'webkitfullscreenchange', fullscreenChanged
);
18 var video
= document
.getElementById('video');
20 var videoEnteredFullScreen = function() {
21 if (window
.internals
) {
22 testExpected("shadowRoot = internals.shadowRoot(video)", null, "!=");
23 testExpected("panel = mediaControlsElement(shadowRoot.firstChild, '-webkit-media-controls-panel')", null, "!=");
24 testExpected("internals.shadowPseudoId(panel)", "-webkit-media-controls-panel");
25 testExpected("document.defaultView.getComputedStyle(panel)['display']", 'none', "!=");
26 testExpected("document.defaultView.getComputedStyle(panel)['height']", '20px', ">=");
29 logResult(false, "window.internals == undefined");
31 callback
= cancelledFullScreen
;
32 document
.webkitCancelFullScreen();
35 var cancelledFullScreen = function() {
36 if (window
.testRunner
)
37 testExpected("document.defaultView.getComputedStyle(panel)['display']", 'none');
39 logResult(false, "window.testRunner == undefined");
44 callback
= videoEnteredFullScreen
;
45 runWithKeyDown(function(){video
.webkitRequestFullScreen()});