OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/run-after-layout-and-paint.js"></script> | 3 <script src="../../resources/run-after-layout-and-paint.js"></script> |
4 <style> | 4 <style> |
5 body { | 5 body { |
6 direction: rtl; | 6 direction: rtl; |
7 margin: 0px; | 7 margin: 0px; |
8 background-color: red; | 8 background-color: red; |
9 } | 9 } |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... |
38 } | 38 } |
39 </style> | 39 </style> |
40 <script> | 40 <script> |
41 function doTest() { | 41 function doTest() { |
42 if (window.testRunner) { | 42 if (window.testRunner) { |
43 testRunner.waitUntilDone(); | 43 testRunner.waitUntilDone(); |
44 testRunner.dumpAsTextWithPixelResults(); | 44 testRunner.dumpAsTextWithPixelResults(); |
45 } | 45 } |
46 | 46 |
47 // The far left coordinate of the document varies by window width. | 47 // The far left coordinate of the document varies by window width. |
48 var offset = document.body.clientWidth - document.body.scrollWidth + 1; | 48 var offset = document.body.clientWidth - document.scrollingElement.scrol
lWidth + 1; |
49 | 49 |
50 window.setTimeout(function() { | 50 window.setTimeout(function() { |
51 window.scrollTo(offset, 0); | 51 window.scrollTo(offset, 0); |
52 if (window.testRunner) { | 52 if (window.testRunner) { |
53 runAfterLayoutAndPaint(function() { | 53 runAfterLayoutAndPaint(function() { |
54 if (top == self) | 54 if (top == self) |
55 document.getElementById('layertree').innerText = window.
internals.layerTreeAsText(document); | 55 document.getElementById('layertree').innerText = window.
internals.layerTreeAsText(document); |
56 testRunner.notifyDone(); | 56 testRunner.notifyDone(); |
57 }); | 57 }); |
58 } | 58 } |
59 }, 0); | 59 }, 0); |
60 } | 60 } |
61 window.addEventListener('load', doTest, false); | 61 window.addEventListener('load', doTest, false); |
62 </script> | 62 </script> |
63 <body> | 63 <body> |
64 <div id="root"></div> | 64 <div id="root"></div> |
65 <div class="positioned indicator"></div> | 65 <div class="positioned indicator"></div> |
66 <div class="positioned layer"></div> | 66 <div class="positioned layer"></div> |
67 | 67 |
68 <pre id="layertree"></pre> | 68 <pre id="layertree"></pre> |
69 </body> | 69 </body> |
70 </html> | 70 </html> |
OLD | NEW |