4 <script src=
"../../resources/js-test.js"></script>
5 <script src=
"resources/link-highlight-helper.js"></script>
6 <link rel=
"stylesheet" type=
"text/css" href=
"resources/link-highlight-style.css">
8 <body onload=
"runTest();">
9 <div style=
"transform: scaleX(2.5); position: absolute; left: 80px; top: 40px;">
10 <a href=
"" id=
"link1">Link
1</a></br>
11 <a href=
"" id=
"targetLink" class=
"activeLink">Target Link.
</a><br>
12 <a href=
"" id=
"link2">Link
2</a>
15 <div style=
"position: relative; left: 10px; top: 200px; transform: translateZ(0);">
16 This test is successful if
"Target Link" above is covered in a green rectangle with square corners.
20 var link
= document
.getElementById('targetLink');
21 var clientRect
= link
.getBoundingClientRect();
22 var highlight
= createCompositedHighlight(link
);
24 highlight
.style
.height
= clientRect
.height
+ "px";
25 highlight
.style
.width
= clientRect
.width
+ "px";
26 highlight
.style
.top
= clientRect
.top
+ "px";
27 highlight
.style
.left
= clientRect
.left
+ "px";
29 if (window
.testRunner
)
30 testRunner
.dumpAsTextWithPixelResults();