blob: 45b4ae5ff59b089a07c33d00d137e0e6d1687b69 [file] [log] [blame]
jamesr@google.come53ce642011-04-14 06:51:50 +00001<!DOCTYPE html>
2<!-- Tests that overflow controls are repainted after compositing is disabled. There should be three green squares and no visible overflow controls -->
3<style>
4.composited {
5-webkit-transform:translateZ(0);
6}
7
8.container {
9width: 100px;
10height:100px;
11position:absolute;
12background-color: green;
13overflow:auto;
14border: 0px;
15}
16
17</style>
18<body onload="test()">
19<iframe id="vertical" class="composited container" src="resources/repaint-after-losing-scrollbars-iframe.html"></iframe>
20<iframe id="horizontal" class="composited container" style="left: 150px" src="resources/repaint-after-losing-scrollbars-iframe.html"></iframe>
21<iframe id="both" class="composited container" style="left: 300px" src="resources/repaint-after-losing-scrollbars-iframe.html"></iframe>
22</body>
23<script>
24function finishTest() {
25 document.getElementById("vertical").contentDocument.body.classList.remove("tall"); // topmost iframe loses a vertical scrollbar
26 document.getElementById("horizontal").contentDocument.body.classList.remove("wide"); // middle iframe loses a horizontal scrollbar
27 document.getElementById("both").contentDocument.body.classList.remove("wide"); // bottom iframe loses both
28 document.getElementById("both").contentDocument.body.classList.remove("tall"); // bottom iframe loses both
29}
30
31function test() {
32 document.getElementById("vertical").contentDocument.body.classList.add("tall"); // topmost iframe starts with a vertical scrollbar
33 document.getElementById("horizontal").contentDocument.body.classList.add("wide"); // middle iframe starts with a horizontal scrollbar
34 document.getElementById("both").contentDocument.body.classList.add("wide"); // bottom iframe starts with both
35 document.getElementById("both").contentDocument.body.classList.add("tall"); // vertical and horizontal scrollbars
36 if (window.layoutTestController) {
37 layoutTestController.dumpAsText(true);
38 layoutTestController.display(); // Paint once with all overflow controls visible.
39 finishTest();
40 } else
41 window.setTimeout(finishTest, 5000);
42}
43</script>