| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <style> | 4 <style> |
| 5 div { | 5 div { |
| 6 border: black solid 1px; | 6 border: black solid 1px; |
| 7 } | 7 } |
| 8 | 8 |
| 9 .composited { | 9 .composited { |
| 10 transform: translateZ(0); | 10 transform: translateZ(0); |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 height: 200px; | 22 height: 200px; |
| 23 background-color: gray; | 23 background-color: gray; |
| 24 } | 24 } |
| 25 | 25 |
| 26 .filler { | 26 .filler { |
| 27 height: 800px; | 27 height: 800px; |
| 28 width: 800px; | 28 width: 800px; |
| 29 background-color: orange; | 29 background-color: orange; |
| 30 } | 30 } |
| 31 | 31 |
| 32 .squash-spacer { |
| 33 position: relative; |
| 34 top: 40px; |
| 35 } |
| 36 |
| 32 .target { | 37 .target { |
| 33 position: relative; | 38 position: relative; |
| 34 top: 80px; | 39 top: 80px; |
| 40 height: 10px; width: 100%; |
| 35 } | 41 } |
| 36 </style> | 42 </style> |
| 37 | 43 |
| 38 <script> | 44 <script> |
| 39 if (window.testRunner) { | 45 if (window.testRunner) { |
| 40 testRunner.dumpAsText(); | 46 testRunner.dumpAsTextWithPixelResults(); |
| 41 testRunner.waitUntilDone(); | 47 testRunner.waitUntilDone(); |
| 42 } | 48 } |
| 43 | 49 |
| 44 if (window.internals) { | 50 if (window.internals) { |
| 45 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); | 51 window.internals.settings.setPreferCompositingToLCDTextEnabled(true); |
| 46 window.internals.settings.setLayerSquashingEnabled(true); | 52 window.internals.settings.setLayerSquashingEnabled(true); |
| 47 } | 53 } |
| 48 | 54 |
| 49 function runTest() { | 55 function runTest() { |
| 50 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); | 56 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); |
| 51 x = (clientRect.left + clientRect.right) / 2; | 57 x = (clientRect.left + clientRect.right) / 2; |
| 52 y = (clientRect.top + clientRect.bottom) / 2; | 58 y = (clientRect.top + clientRect.bottom) / 2; |
| 53 | 59 |
| 54 if (window.eventSender) { | 60 if (window.eventSender) { |
| 55 eventSender.gestureShowPress(x, y); | 61 eventSender.gestureShowPress(x, y); |
| 56 window.testRunner.notifyDone(); | 62 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
| 57 } | 63 } |
| 58 } | 64 } |
| 59 | 65 |
| 60 window.onload = runTest; | 66 window.onload = runTest; |
| 61 </script> | 67 </script> |
| 62 </head> | 68 </head> |
| 63 <body> | 69 <body> |
| 64 <div class='fixed composited'></div> | 70 <div class='fixed composited'></div> |
| 65 <div class='container'> | 71 <div class='container'> |
| 66 <div class='composited'></div> | 72 <div class='composited'></div> |
| 73 <div class='squash-spacer'></div> |
| 67 <div class='target'> | 74 <div class='target'> |
| 68 <a href='#' id='targetLink'>Target Link.</a> | 75 <a href='#' id='targetLink'>Target Link.</a> |
| 69 </div> | 76 </div> |
| 70 <div class='filler'></div> | 77 <div class='filler'></div> |
| 71 </div> | 78 </div> |
| 72 | 79 |
| 73 This test is successful if it doesn't crash. | 80 This test is successful if it doesn't crash. |
| 74 </body> | 81 </body> |
| 75 </html> | 82 </html> |
| OLD | NEW |