OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
| 4 <script src="../../resources/run-after-display.js"></script> |
4 <style> | 5 <style> |
5 body { | 6 body { |
6 direction: rtl; | 7 direction: rtl; |
7 margin: 0px; | 8 margin: 0px; |
8 } | 9 } |
9 | 10 |
10 #layer { | 11 #layer { |
11 position: absolute; | 12 position: absolute; |
12 top: 50px; | 13 top: 50px; |
13 right: 50px; | 14 right: 50px; |
14 width: 100px; | 15 width: 100px; |
15 height: 100px; | 16 height: 100px; |
16 background-color: red; | 17 background-color: red; |
17 } | 18 } |
18 | 19 |
19 #root { | 20 #root { |
20 width: 1000px; | 21 width: 1000px; |
21 height: 1000px; | 22 height: 1000px; |
22 -webkit-transform:translateZ(0); | 23 -webkit-transform:translateZ(0); |
23 } | 24 } |
24 </style> | 25 </style> |
25 <script> | 26 <script> |
26 function doTest() { | 27 function doTest() { |
27 if (window.testRunner) { | 28 if (window.testRunner) { |
28 testRunner.display(); | 29 testRunner.waitUntilDone(); |
29 testRunner.dumpAsTextWithPixelResults(); | 30 testRunner.dumpAsTextWithPixelResults(); |
30 } | 31 } |
31 // This test passes if this element is repainted correctly, even | 32 runAfterDisplay(function() { |
32 // on a page that is composited and has horizontal overflow. | 33 // This test passes if this element is repainted correctly, even |
33 var elem = document.getElementById("layer"); | 34 // on a page that is composited and has horizontal overflow. |
34 elem.style.backgroundColor = "green"; | 35 var elem = document.getElementById("layer"); |
| 36 elem.style.backgroundColor = "green"; |
| 37 if (window.testRunner) |
| 38 testRunner.notifyDone(); |
| 39 }); |
35 } | 40 } |
36 window.addEventListener('load', doTest, false); | 41 window.addEventListener('load', doTest, false); |
37 </script> | 42 </script> |
38 <body> | 43 <body> |
39 <div id="layer" class=""></div> | 44 <div id="layer" class=""></div> |
40 <div id="root"></div> | 45 <div id="root"></div> |
41 </body> | 46 </body> |
42 </html> | 47 </html> |
OLD | NEW |