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