| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="resources/link-highlight-helper.js"></script> |
| <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css"> |
| </head> |
| <body onload="runTest();"> |
| <div id="container" style="position: absolute; left: 40px; top: 80px;"> |
| <div style="transform: scaleY(2);"> |
| <a href="" id="link1">Link 1</a></br> |
| <a href="" class="activeLink" href="" id="targetLink">Target Link.</a><br> |
| <a href="" id="link2">Link 2</a> |
| </div> |
| </div> |
| </div> |
| <div style="position: relative; left: 10px; top: 200px; will-change: transform;"> |
| This test is successful if "Target Link" above is covered in a green rectangle with square corners. |
| </div> |
| <script> |
| function runTest() { |
| var link = document.getElementById('targetLink'); |
| var highlight = createCompositedHighlight(link); |
| var clientRect = link.getBoundingClientRect(); |
| |
| highlight.style.height = clientRect.height + "px"; |
| highlight.style.width = clientRect.width + "px"; |
| highlight.style.top = clientRect.top + "px"; |
| highlight.style.left = clientRect.left + "px"; |
| } |
| </script> |
| </script> |
| </body> |
| </html> |