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=
"transform: translateZ(0); position: relative; left: 10px; top: 10px"></div>
9 <div id=
"targetDiv" style=
"position: relative; left: 10px; top: 40px; width: 200px; height: 100px; overflow-y: scroll; overflow-x: scroll;">
10 <a href=
"">Link
1</a><br>
11 <a href=
"">Link
2</a><br>
12 <a href=
"">Link
3</a><br>
13 <a class=
"opaqueHighlight" href=
"" id=
"targetLink">Target Link.
</a><br>
14 <a href=
"">Link
4</a><br>
15 <a href=
"">Link
5</a><br>
17 <div style=
"position: relative; left: 10px; top: 80px">
18 This test is successful if
"Target Link" above is covered in a green rectangle with square corners.
23 var targetDiv
= document
.getElementById('targetDiv');
24 var clientRect
= document
.getElementById('targetLink').getBoundingClientRect();
25 x
= (clientRect
.left
+ clientRect
.right
) / 2;
26 y
= (clientRect
.top
+ clientRect
.bottom
) / 2;
27 if (window
.testRunner
) {
28 testRunner
.dumpAsTextWithPixelResults();
29 testRunner
.waitUntilDone();
32 if (window
.eventSender
) {
33 eventSender
.gestureShowPress(x
, y
);
34 targetDiv
.scrollTop
+= 20;
35 window
.setTimeout(function() { window
.testRunner
.notifyDone(); }, 0);
37 debug("This test requires DumpRenderTree.");