Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / gestures / gesture-tapHighlight-pixel-transparent.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
6 </head>
7 <body onload="runTest();">
8 <a href="" id="link1">Link 1</a><br>
9 <a href="" id="targetLink" class="transparentHighlight">Target Link.</a><br>
10 <a href="" id="link2">Link 2</a>
11 <div style="position: relative; left: 0px; top: 200px; transform: translateZ(0);">
12 This test is successful if "Target Link" above is covered in a transparent green rectangle with rounded corners.
13 </div>
14 <script>
15 function runTest() {
16     var clientRect = document.getElementById('targetLink').getBoundingClientRect();
17     x = (clientRect.left + clientRect.right) / 2;
18     y = (clientRect.top + clientRect.bottom) / 2;
19     if (window.testRunner) {
20         testRunner.dumpAsTextWithPixelResults();
21         testRunner.waitUntilDone();
22     }
23
24     if (window.eventSender) {
25         eventSender.gestureShowPress(x, y);
26         window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
27     } else {
28         debug("This test requires DumpRenderTree.");
29     }
30 }
31 </script>
32 </script>
33 </body>
34 </html>