| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="resources/link-highlight-helper.js"></script> | 4 <script src="resources/link-highlight-helper.js"></script> |
| 5 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css"
> | 5 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css"
> |
| 6 <style> | 6 <style> |
| 7 ::-webkit-scrollbar { | 7 ::-webkit-scrollbar { |
| 8 width: 0px; | 8 width: 0px; |
| 9 height: 0px; | 9 height: 0px; |
| 10 } | 10 } |
| 11 </style> | 11 </style> |
| 12 </head> | 12 </head> |
| 13 <body onload="runTest();"> | 13 <body onload="runTest();"> |
| 14 <div style="position: relative; left: 10; top: 40"> | 14 <div style="position: relative; left: 10; top: 40"> |
| 15 <a href="" id="targetLink" class="opaqueHighlight">Target Link.</a> | 15 <a href="" id="targetLink" class="opaqueHighlight">Target Link.</a> |
| 16 </div> | 16 </div> |
| 17 <div style="-webkit-transform: translateZ(0); position: relative; left: 10; top:
70"> | 17 <div style="transform: translateZ(0); position: relative; left: 10; top: 70"> |
| 18 This test is successful if "Target Link" above is covered in a green rectangle w
ith square corners. | 18 This test is successful if "Target Link" above is covered in a green rectangle w
ith square corners. |
| 19 </div> | 19 </div> |
| 20 <script> | 20 <script> |
| 21 function runTest() { | 21 function runTest() { |
| 22 useMockHighlight(); | 22 useMockHighlight(); |
| 23 | 23 |
| 24 if (window.eventSender) { | 24 if (window.eventSender) { |
| 25 window.eventSender.setPageScaleFactor(2, 0, 0); | 25 window.eventSender.setPageScaleFactor(2, 0, 0); |
| 26 } | 26 } |
| 27 | 27 |
| 28 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); | 28 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); |
| 29 x = (clientRect.left + clientRect.right) / 2; | 29 x = (clientRect.left + clientRect.right) / 2; |
| 30 y = (clientRect.top + clientRect.bottom) / 2; | 30 y = (clientRect.top + clientRect.bottom) / 2; |
| 31 if (window.testRunner) | 31 if (window.testRunner) |
| 32 testRunner.waitUntilDone(); | 32 testRunner.waitUntilDone(); |
| 33 | 33 |
| 34 if (window.eventSender) { | 34 if (window.eventSender) { |
| 35 eventSender.gestureShowPress(x, y); | 35 eventSender.gestureShowPress(x, y); |
| 36 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); | 36 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
| 37 } else { | 37 } else { |
| 38 debug("This test requires DumpRenderTree."); | 38 debug("This test requires DumpRenderTree."); |
| 39 } | 39 } |
| 40 } | 40 } |
| 41 </script> | 41 </script> |
| 42 </script> | 42 </script> |
| 43 </body> | 43 </body> |
| 44 </html> | 44 </html> |
| OLD | NEW |