| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>This test ensures all elements are highlighted in a multielement <a> when
the text is clicked</title> |
| 5 <script src="resources/link-highlight-helper.js"></script> |
| 6 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css"
> |
| 7 </head> |
| 8 <body onload="runTest();"> |
| 9 <div style="-webkit-transform: translateZ(0); padding: 20px;"> |
| 10 <a id="targetLink"> |
| 11 <font style="vertical-align: bottom" id="beforeTarget">Before Text</font> |
| 12 <img id="imgTarget" width="320" height="240" src="resources/dice.png"> |
| 13 <font style="vertical-align: bottom" id="afterTarget">After Text</font> |
| 14 </a> |
| 15 </div> |
| 16 <script> |
| 17 function runTest() { |
| 18 var beforeHighlight = createSquareCompositedHighlight(document.getElementByI
d('beforeTarget')); |
| 19 createSquareCompositedHighlight(document.getElementById('imgTarget')); |
| 20 var afterHighlight = createSquareCompositedHighlight(document.getElementById
('afterTarget')); |
| 21 |
| 22 // We need to simulate filling in the <a> tag's "line box". It's not really
the line box, but |
| 23 // to see what we're filling in, hover over the <a> tag in devtools. To do t
his, we'll just |
| 24 // strech the first highlight across the linebox to the end. |
| 25 beforeHighlight.style.width = afterHighlight.offsetLeft + |
| 26 afterHighlight.offsetWidth - |
| 27 beforeHighlight.offsetLeft + "px"; |
| 28 |
| 29 if (window.testRunner) |
| 30 testRunner.dumpAsTextWithPixelResults(); |
| 31 } |
| 32 </script> |
| 33 </script> |
| 34 </body> |
| 35 </html> |
| OLD | NEW |