4 <script src=
"../../resources/js-test.js"></script>
5 <link rel=
"stylesheet" type=
"text/css" href=
"resources/link-highlight-style.css">
7 <body onload=
"runTest();">
8 <div style=
"transform: translateZ(0); position: relative; left: 10; top: 40">
9 <a class=
"opaqueHighlight" href=
"" id=
"targetLink">Long Target
<br>Link.
</a>
11 <div style=
"position: relative; left: 10; top: 70">
12 This test is successful if
"Long Target Link" above is covered in two green rectangles with square corners.
16 var clientRect
= document
.getElementById('targetLink').getBoundingClientRect();
17 x
= (clientRect
.left
+ clientRect
.right
) / 2;
18 y
= (clientRect
.top
+ clientRect
.bottom
) / 2;
19 touchWidth
= (clientRect
.right
- clientRect
.left
) / 4;
20 touchHeight
= (clientRect
.bottom
- clientRect
.top
) / 4;
21 if (window
.testRunner
) {
22 testRunner
.dumpAsTextWithPixelResults();
23 testRunner
.waitUntilDone();
26 if (window
.eventSender
) {
27 eventSender
.gestureShowPress(x
, y
, touchWidth
, touchHeight
);
28 window
.setTimeout(function() { window
.testRunner
.notifyDone(); }, 0);
30 debug("This test requires DumpRenderTree.");