4 <script src=
"resources/link-highlight-helper.js"></script>
5 <link rel=
"stylesheet" type=
"text/css" href=
"resources/link-highlight-style.css">
7 <body onload=
"runTest();">
8 <div id=
"targetDiv" style=
"transform: translateZ(0); position: relative; left: 10px; top: 10px"></div>
9 <div style=
"position: relative; left: 10px; top: 40px; width: 300px; height: 150px; overflow-y: scroll; overflow-x: scroll;">
10 <div style=
"position: relative; left: 10px; top: i10px; width: 200px; height: 100px; overflow-y: scroll; overflow-x: scroll;">
11 <a href=
"">Link
1</a><br>
12 <a href=
"">Link
2</a><br>
13 <a href=
"">Link
3</a><br>
14 <a href=
"" class=
"opaqueHighlight" id=
"targetLink">Target Link.
</a><br>
15 <a href=
"">Link
4</a><br>
16 <a href=
"">Link
5</a><br>
18 <a href=
"">Link
6</a><br>
19 <a href=
"">Link
7</a><br>
20 <a href=
"">Link
8</a><br>
21 <a href=
"">Link
9</a><br>
23 <div style=
"position: relative; left: 10px; top: 80px">
24 This test is successful if
"Target Link" above is covered in a green rectangle with square corners.
29 var clientRect
= document
.getElementById('targetLink').getBoundingClientRect();
30 x
= (clientRect
.left
+ clientRect
.right
) / 2;
31 y
= (clientRect
.top
+ clientRect
.bottom
) / 2;
32 if (window
.testRunner
) {
33 testRunner
.dumpAsTextWithPixelResults();
34 testRunner
.waitUntilDone();
37 if (window
.eventSender
) {
38 eventSender
.gestureShowPress(x
, y
);
39 window
.setTimeout(function() { window
.testRunner
.notifyDone(); }, 0);
41 debug("This test requires DumpRenderTree.");