| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>This test ensures all elements are highlighted in a multielement <a> when the image is clicked</title> |
| <link rel="stylesheet" href="resources/link-highlight-style.css"> |
| </head> |
| <body onload="runTest();"> |
| <div style="will-change: transform; padding: 20px;"> |
| <a href="" id="targetLink" style="-webkit-tap-highlight-color: rgb(0, 255, 0)"> |
| <font id="beforeTarget">Before Text</font><img id="imgTarget" width="320" height="240" src="resources/dice.png"><font id="afterTarget">After Text!</font> |
| </a> |
| </div> |
| <script> |
| function runTest() { |
| var clientRect = document.getElementById('imgTarget').getBoundingClientRect(); |
| x = (clientRect.left + clientRect.right) / 2; |
| y = (clientRect.top + clientRect.bottom) / 2; |
| if (window.testRunner) |
| testRunner.waitUntilDone(); |
| |
| if (window.eventSender) { |
| eventSender.gestureShowPress(x, y); |
| window.setTimeout(function() { testRunner.notifyDone(); }, 0); |
| } else { |
| debug("This test requires DumpRenderTree."); |
| debug("This test is successful if the image and text below is covered in a green rectangle."); |
| } |
| } |
| </script> |
| </script> |
| </body> |
| </html> |