summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fullscreen/full-screen-iframe-zIndex.html
blob: 44b5afde09901d48b907bbc3c1ffae1bb0ea1a6e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<!DOCTYPE html>
<html>
    <head>
        <script>
            var runPixelTests = true;

            function init() {
                var iframe = document.getElementById('block1');
                var element = iframe.contentDocument.documentElement;
                waitForEventAndEnd(element, 'webkitfullscreenchange');
                runWithKeyDown(goFullScreen);
            }

            function goFullScreen() {
               var iframe = document.getElementById('block1');
               var element = iframe.contentDocument.documentElement;
               element.webkitRequestFullScreen();
            }
        </script>
        <script src="full-screen-test.js"></script>
        <style>
            #block1 {
                width: 200px;
                height: 100px;
                border: 4px solid darkgreen;
                background-color: green;
                z-index: 0;
            }
            #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, the whole screen should be white.
             Click <button onclick="goFullScreen()">go full screen</button> to run the test.</div>
        <div id="block2"></div>
        <iframe allowfullscreen src="resources/empty.html" id="block1"></iframe>
    </body>
</html>