| 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 </head> | 6 </head> |
| 7 <body onload="runTest();"> | 7 <body onload="runTest();"> |
| 8 <div style="-webkit-transform: translateZ(0); padding: 20px;"> | 8 <div style="transform: translateZ(0); padding: 20px;"> |
| 9 <a href="" id="targetLink" class="opaqueHighlight"><img width="320" height="240"
src="resources/dice.png"></a> | 9 <a href="" id="targetLink" class="opaqueHighlight"><img width="320" height="240"
src="resources/dice.png"></a> |
| 10 </div> | 10 </div> |
| 11 <script> | 11 <script> |
| 12 function runTest() { | 12 function runTest() { |
| 13 useMockHighlight(); | 13 useMockHighlight(); |
| 14 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); | 14 var clientRect = document.getElementById('targetLink').getBoundingClientRect
(); |
| 15 x = (clientRect.left + clientRect.right) / 2; | 15 x = (clientRect.left + clientRect.right) / 2; |
| 16 y = (clientRect.top + clientRect.bottom) / 2; | 16 y = (clientRect.top + clientRect.bottom) / 2; |
| 17 if (window.testRunner) { | 17 if (window.testRunner) { |
| 18 testRunner.dumpAsTextWithPixelResults(); | 18 testRunner.dumpAsTextWithPixelResults(); |
| 19 testRunner.waitUntilDone(); | 19 testRunner.waitUntilDone(); |
| 20 } | 20 } |
| 21 | 21 |
| 22 if (window.eventSender) { | 22 if (window.eventSender) { |
| 23 eventSender.gestureShowPress(x, y); | 23 eventSender.gestureShowPress(x, y); |
| 24 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); | 24 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0); |
| 25 } else { | 25 } else { |
| 26 debug("This test requires DumpRenderTree."); | 26 debug("This test requires DumpRenderTree."); |
| 27 debug("This test is successful if the image below is covered in a green
rectangle."); | 27 debug("This test is successful if the image below is covered in a green
rectangle."); |
| 28 } | 28 } |
| 29 } | 29 } |
| 30 </script> | 30 </script> |
| 31 </script> | 31 </script> |
| 32 </body> | 32 </body> |
| 33 </html> | 33 </html> |
| OLD | NEW |