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