summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fullscreen/full-screen-fixed-pos-parent.html
blob: 7bf149636d60c60a9d55687743c3b75b22d60a7f (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
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html>
<style>
    #bad {
        position: fixed;
        top: 0px;
        left: 0px;
        background-color: red;
        width: 100%;
        height: 100%;
    }

    #fixed-container {
        position: fixed;
        top: 0px;
        left: 0px;
        z-index: 0;
    }

    #fullscreenme {
        height: 400px;
        width: 400px;
        border: 0px;
    }
</style>
</head>
<script src="full-screen-test.js"></script>
<script>
    function doTest() {
        if (window.testRunner) {
            testRunner.dumpAsTextWithPixelResults();
            testRunner.waitUntilDone();
        }
        document.body.offsetTop;
        var fullscreen = document.getElementById('fullscreenme');

        var fullscreenChangeEvent = function(event) {
            if (window.testRunner)
                testRunner.notifyDone();
        };

        document.addEventListener('webkitfullscreenchange', fullscreenChangeEvent);
        document.addEventListener('keydown', function () {
            fullscreen.webkitRequestFullScreen();

        });
        if (window.eventSender)
            eventSender.keyDown('a');
    }
    window.addEventListener("load", doTest, false);
</script>
<body>
    <!-- when full screening the iframe, bad should not be visible -->
    <div id="fixed-container">
        <iframe id="fullscreenme" src="resources/green.html"></iframe>
    </div>
    <div id="bad"></div>
</body>
</html>