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