Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / gestures / gesture-tapHighlight-composited-img.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="resources/link-highlight-helper.js"></script>
5 <script src="../../resources/js-test.js"></script>
6 <link rel="stylesheet" type="text/css" href="resources/link-highlight-style.css">
7 </head>
8 <body onload="runTest();" style="overflow: hidden">
9   <img class="opaqueHighlight" style="cursor: pointer; -webkit-transform: translateZ(0)" width="320" height="240" id="targetLink" src="resources/dice.png">
10 </div>
11 <script>
12 function runTest() {
13     useMockHighlight();
14     var clientRect = document.getElementById('targetLink').getBoundingClientRect();
15     x = (clientRect.left + clientRect.right) / 2;
16     y = (clientRect.top + clientRect.bottom) / 2;
17
18     if (window.testRunner) {
19         testRunner.dumpAsTextWithPixelResults();
20         testRunner.waitUntilDone();
21     }
22
23     if (window.eventSender) {
24         eventSender.gestureShowPress(x, y);
25         window.setTimeout(function() { window.testRunner.notifyDone(); }, 0);
26     } else {
27         debug("This test requires DumpRenderTree.");
28         debug("This test makes sure that a link highlight is shown for a graphics " +
29               "layer that does not use composited scrolling.");
30         debug("This test is successful if the image below is covered in a green rectangle.");
31     }
32 }
33 </script>
34 </script>
35 </body>
36 </html>