summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/frames/flattening/iframe-flattening-out-of-view.html
blob: e245560a6bb105b17318ef1a3e6190a7c26a4e41 (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
<html>
<head>
    <script type="text/javascript">
        function test()
        {
            if (window.layoutTestController)
                layoutTestController.setFrameFlatteningEnabled(true);
            // Force synchronous layout.
            document.body.offsetHeight;
        }
    </script>
</head>
<body onload="test()">
    <div>
        <p>Test that an iframe with negative coordinates is not flattened, but an iframe with positive coordinates is, even if it is out of view.
    </div>

    <!-- DRT size is 800x600 pixels, one needs to be flexible in order to use frame flattening -->
    <p><iframe width="25%" height="200" style='border: 0px; position: absolute; left: 0px; top: -200px;' src="data:text/html,
        <style>body { background-color: red; }</style>
        <body>
            <div style='position: absolute; width: 800px; height: 800px; left: 0; top: 0px;'>You should not see me.</div>
        </body>
        "></iframe>

    <p><iframe width="25%" height="200" style='border: 0px; position: absolute; left: 1200px; top: 0px;' src="data:text/html,
        <style>body { background-color: blue; }</style>
        <body>
            <div style='position: absolute; width: 8000px; height: 800px; left: 0; top: 0px;'>You will not see me but you will see the horizontal scrollbar streching.</div>
        </body>
        "></iframe>
</body>
</html>