b62017b39af094ae70a8b1154520936cc704d167
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / rtl / rtl-fixed-overflow-scrolled.html
1 <html>
2 <head>
3 <script src="../../resources/run-after-display.js"></script>
4 <style>
5     body {
6         direction: rtl;
7         margin: 0px;
8         background-color: red;
9     }
10
11     .positioned {
12         position: fixed;
13         top: 50px;
14         left: 50px;
15         width: 100px;
16         height: 100px;
17     }
18
19     .indicator {
20         background-color: red;
21     }
22
23     .layer {
24         -webkit-transform:translateZ(0);
25         background-color: green;
26     }
27
28     #root {
29         width: 1000px;
30         height: 1000px;
31         background-color: white;
32     }
33
34     #layertree {
35         position: absolute;
36         top: 10000px;
37         left: 0px;
38     }
39 </style>
40 <script>
41     function doTest() {
42         if (window.testRunner) {
43             testRunner.waitUntilDone();
44             testRunner.dumpAsTextWithPixelResults();
45         }
46
47         // The far left coordinate of the document varies by window width.
48         var offset = document.body.clientWidth - document.body.scrollWidth + 1;
49
50         window.setTimeout(function() {
51             window.scrollTo(offset, 0);
52             if (window.testRunner) {
53                 runAfterDisplay(function() {
54                     if (top == self)
55                         document.getElementById('layertree').innerText = window.internals.layerTreeAsText(document);
56                     testRunner.notifyDone();
57                 });
58             }
59         }, 0);
60     }
61     window.addEventListener('load', doTest, false);
62 </script>
63 <body>
64     <div id="root"></div>
65     <div class="positioned indicator"></div>
66     <div class="positioned layer"></div>
67
68     <pre id="layertree"></pre>
69 </body>
70 </html>