Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / compositing / gestures / gesture-tapHighlight-with-squashing.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5   div {
6     border: black solid 1px;
7   }
8
9   .composited {
10     transform: translateZ(0);
11   }
12
13   .fixed {
14     position: fixed;
15     background-color: red;
16     width: 500px;
17     height: 500px;
18   }
19
20   .container {
21     overflow: scroll;
22     height: 200px;
23     background-color: gray;
24   }
25
26   .filler {
27     height: 800px;
28     width: 800px;
29     background-color: orange;
30   }
31
32   .target {
33     position: relative;
34     top: 80px;
35   }
36 </style>
37
38 <script>
39   if (window.testRunner) {
40     testRunner.dumpAsText();
41     testRunner.waitUntilDone();
42   }
43
44   if (window.internals) {
45     window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
46     window.internals.settings.setLayerSquashingEnabled(true);
47   }
48
49   function runTest() {
50     var clientRect = document.getElementById('targetLink').getBoundingClientRect();
51     x = (clientRect.left + clientRect.right) / 2;
52     y = (clientRect.top + clientRect.bottom) / 2;
53
54     if (window.eventSender) {
55       eventSender.gestureShowPress(x, y);
56       window.testRunner.notifyDone();
57     }
58   }
59
60   window.onload = runTest;
61 </script>
62 </head>
63 <body>
64   <div class='fixed composited'></div>
65   <div class='container'>
66     <div class='composited'></div>
67     <div class='target'>
68       <a href='#' id='targetLink'>Target Link.</a>
69     </div>
70     <div class='filler'></div>
71   </div>
72
73   This test is successful if it doesn't crash.
74 </body>
75 </html>