| OLD | NEW |
| 1 <script src="../../resources/run-after-display.js"></script> |
| 1 <style> | 2 <style> |
| 2 .parent { | 3 .parent { |
| 3 position: relative; | 4 position: relative; |
| 4 background-color: black; | 5 background-color: black; |
| 5 width: 100px; | 6 width: 100px; |
| 6 height: 100px; | 7 height: 100px; |
| 7 } | 8 } |
| 8 .child { | 9 .child { |
| 9 background-color: red; | 10 background-color: red; |
| 10 width: 100px; | 11 width: 100px; |
| 11 height: 100px; | 12 height: 100px; |
| 12 } | 13 } |
| 13 </style> | 14 </style> |
| 14 <div class=parent> | 15 <div class=parent> |
| 15 <div class=child> | 16 <div class=child> |
| 16 </div> | 17 </div> |
| 17 </div> | 18 </div> |
| 18 <div class=parent> | 19 <div class=parent> |
| 19 <div> | 20 <div> |
| 20 <div class=child> | 21 <div class=child> |
| 21 </div> | 22 </div> |
| 22 </div> | 23 </div> |
| 23 </div> | 24 </div> |
| 24 <script> | 25 <script> |
| 25 document.body.offsetTop; | |
| 26 if (window.testRunner) | 26 if (window.testRunner) |
| 27 testRunner.display(); | 27 testRunner.waitUntilDone(); |
| 28 var children = document.getElementsByClassName("child"); | 28 runAfterDisplay(function() { |
| 29 children[0].style.backgroundColor = "rgba(0,255,0,0.5)"; | 29 var children = document.getElementsByClassName("child"); |
| 30 children[1].style.backgroundColor = "rgba(0,255,0,0.5)"; | 30 children[0].style.backgroundColor = "rgba(0,255,0,0.5)"; |
| 31 children[1].style.backgroundColor = "rgba(0,255,0,0.5)"; |
| 32 if (window.testRunner) |
| 33 testRunner.notifyDone(); |
| 34 }); |
| 31 </script> | 35 </script> |
| OLD | NEW |