blob: 5785f6b23f06d8b23d157dc98afcf571075a40d7 [file] [log] [blame]
enne@google.com84515952011-06-24 18:35:12 +00001<html>
2<head>
3<style>
4 body {
5 direction: rtl;
enne@google.combfa90342012-05-09 22:01:09 +00006 margin: 0px;
7 background-color: red;
enne@google.com84515952011-06-24 18:35:12 +00008 }
9
10 .positioned {
11 position: fixed;
12 top: 50px;
13 left: 50px;
14 width: 100px;
15 height: 100px;
16 }
17
18 .indicator {
19 background-color: red;
20 }
21
22 .layer {
23 -webkit-transform:translateZ(0);
24 background-color: green;
25 }
26
27 #root {
28 width: 1000px;
29 height: 1000px;
enne@google.combfa90342012-05-09 22:01:09 +000030 background-color: white;
enne@google.com84515952011-06-24 18:35:12 +000031 }
32
33 #layertree {
34 position: absolute;
35 top: 10000px;
36 left: 0px;
37 }
38</style>
39<script>
40 function doTest() {
rniwa@webkit.org18904132012-06-11 18:29:22 +000041 if (window.testRunner) {
42 testRunner.waitUntilDone();
43 testRunner.dumpAsText(true);
enne@google.com84515952011-06-24 18:35:12 +000044 }
45
46 // The far left coordinate of the document varies by window width.
47 var offset = document.body.clientWidth - document.body.scrollWidth + 1;
48
49 window.setTimeout(function() {
50 window.scrollTo(offset, 0);
rniwa@webkit.org18904132012-06-11 18:29:22 +000051 if (window.testRunner) {
enne@google.comd3f7440d2011-06-24 22:15:29 +000052 if (top == self)
rniwa@webkit.org18904132012-06-11 18:29:22 +000053 document.getElementById('layertree').innerText = testRunner.layerTreeAsText();
54 testRunner.notifyDone();
enne@google.com84515952011-06-24 18:35:12 +000055 }
56 }, 0);
57 }
58 window.addEventListener('load', doTest, false);
59</script>
60<body>
61 <div id="root"></div>
62 <div class="positioned indicator"></div>
63 <div class="positioned layer"></div>
64
65 <pre id="layertree"></pre>
66</body>
67</html>