5 var runPixelTests = true;
8 // Bail out early if the full screen API is not enabled or is missing:
9 if (Element.prototype.webkitRequestFullScreen == undefined) {
10 logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
13 var iframe = document.getElementById('block1');
14 var element = iframe.contentDocument.documentElement;
15 waitForEventAndEnd(element, 'webkitfullscreenchange');
16 runWithKeyDown(goFullScreen);
20 function goFullScreen() {
21 var iframe = document.getElementById('block1');
22 var element = iframe.contentDocument.documentElement;
23 element.webkitRequestFullScreen();
26 <script src="full-screen-test.js"></script>
31 border: 4px solid darkgreen;
32 background-color: green;
37 border: 4px solid darkred;
38 background-color: red;
46 <body onload="init()">
47 <div>This tests that an element with a positive z-index appears behind the full screen element.
48 After entering full screen mode, only a white box should be visible.
49 Click <button onclick="goFullScreen()">go full screen</button> to run the test.</div>
50 <div id="block2"></div>
51 <iframe webkitallowfullscreen src="resources/inner.html" id="block1"></iframe>