blob: e6dac8253dd83a69bb531b84738ff68781e5dccd [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script>
var runPixelTests = true;
function init() {
// Bail out early if the full screen API is not enabled or is missing:
if (Element.prototype.webkitRequestFullScreen == undefined) {
logResult(false, "Element.prototype.webkitRequestFullScreen == undefined");
endTest();
} else {
waitForEventAndEnd(document, 'webkitfullscreenchange');
runWithKeyDown(goFullScreen);
}
}
function goFullScreen() {
document.getElementById('block1').webkitRequestFullScreen();
}
</script>
<script src="full-screen-test.js"></script>
<style>
#block1 {
width: 200px;
height: 100px;
border: 4px solid darkgreen;
background-color: green;
z-index: 100;
position: relative;
}
#block2 {
width: 100px;
height: 50px;
border: 4px solid darkred;
background-color: red;
z-index: 500;
position: relative;
left: 50px;
top: 25px;
}
</style>
</head>
<body onload="init()">
<div>This tests that an element with a positive z-index appears behind the full screen element.
After entering full screen mode, only a green box should be visible.
Click <button onclick="goFullScreen()">go full screen</button> to run the test.</div>
<div id="block2"></div>
<div id="block1"></div>
</body>