OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="resources/link-highlight-helper.js"></script> |
| 3 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css"
> |
| 4 <body onload="runTest()"> |
| 5 <div id=parent style="overflow: scroll; will-change: transform"> |
| 6 <div class="target" style="position: relative; transform: skew(-15deg);"></div
> |
| 7 <a href="test" id="targetLink" class="opaqueHighlight"> |
| 8 <div style="width: 1000px; height: 500px; background: lightgray" ></div> |
| 9 </a> |
| 10 </div> |
| 11 </div> |
| 12 This test passes if the entire gray rectangle changes color to green. |
| 13 </body> |
| 14 |
| 15 <script> |
| 16 function runTest() { |
| 17 useMockHighlight(); |
| 18 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); |
| 19 x = (clientRect.left + clientRect.right) / 2; |
| 20 y = (clientRect.top + clientRect.bottom) / 2; |
| 21 |
| 22 if (window.testRunner) { |
| 23 testRunner.dumpAsTextWithPixelResults(); |
| 24 testRunner.waitUntilDone(); |
| 25 } |
| 26 |
| 27 if (window.eventSender) { |
| 28 eventSender.gestureShowPress(x, y); |
| 29 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
| 30 } else { |
| 31 debug("This test requires DumpRenderTree."); |
| 32 } |
| 33 } |
| 34 </script> |
| 35 </body> |
| 36 </html> |
| 37 |
OLD | NEW |