| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="resources/link-highlight-helper.js"></script> |
| <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css"> |
| </head> |
| <body onload="runTest();"> |
| <div style="will-change: transform; position: relative; left: 10; top: 40"> |
| <a class="opaqueHighlight" href="" id="targetLink"> Long Target <br> Link. </a> |
| </div> |
| <div style="position: relative; left: 10; top: 70"> |
| This test is successful if "Long Target Link" above is covered in two green rectangles with square corners. |
| </div> |
| <script> |
| function runTest() { |
| var clientRect = document.getElementById('targetLink').getBoundingClientRect(); |
| x = (clientRect.left + clientRect.right) / 2; |
| y = (clientRect.top + clientRect.bottom) / 2; |
| touchWidth = (clientRect.right - clientRect.left) / 4; |
| touchHeight = (clientRect.bottom - clientRect.top) / 4; |
| if (window.testRunner) |
| testRunner.waitUntilDone(); |
| |
| if (window.eventSender) { |
| eventSender.gestureShowPress(x, y, touchWidth, touchHeight); |
| window.setTimeout(function() { testRunner.notifyDone(); }, 0); |
| } else { |
| debug("This test requires DumpRenderTree."); |
| } |
| } |
| </script> |
| </script> |
| </body> |
| </html> |