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