4 <script src="../../resources/js-test.js"></script>
5 <script src="resources/link-highlight-helper.js"></script>
6 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
8 <body onload="runTest();">
9 <div style="transform: translateZ(0); width=1600px; height: 1000px">
10 <div style="position: relative; left: 100; top: 50;">
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>
16 <div style="position: relative; left: 100; top: 150; width: 700;">
17 This test is successful if "Target Link" above is covered in a green rectangle with square corners,
18 and the window is partially scrolled in both directions.
21 <div style="width: 1000px; height: 10px"></div>
26 var clientRect = document.getElementById('targetLink').getBoundingClientRect();
27 x = (clientRect.left + clientRect.right) / 2;
28 y = (clientRect.top + clientRect.bottom) / 2;
29 if (window.testRunner) {
30 testRunner.dumpAsTextWithPixelResults();
31 testRunner.waitUntilDone();
34 if (window.eventSender) {
35 eventSender.gestureShowPress(x, y);
36 //window.scrollTo(50, 30)
37 window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
39 debug("This test requires DumpRenderTree.");