Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / gestures / gesture-tapHighlight-1-overflow-div-scrolled.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
5 <script src="resources/link-highlight-helper.js"></script>
6 </head>
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>
16 </div>
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.
19 </div>
20 <script>
21 function runTest() {
22     useMockHighlight();
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();
30     }
31
32     if (window.eventSender) {
33         eventSender.gestureShowPress(x, y);
34         targetDiv.scrollTop += 20;
35         window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
36     } else {
37         debug("This test requires DumpRenderTree.");
38     }
39 }
40 </script>
41 </script>
42 </body>
43 </html>