(iPad) Link tapping is sluggish on many sites
[WebKit-https.git] / LayoutTests / fast / events / ios / fast-click-double-tap-sends-click-when-initial-scale.html
1 <!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
2
3 <html>
4 <meta name="viewport" content="initial-scale=0.98,width=device-width">
5 <head>
6     <script src="../../../resources/ui-helper.js"></script>
7     <script>
8         if (window.testRunner) {
9             testRunner.dumpAsText();
10             testRunner.waitUntilDone();
11         }
12
13         async function runTest()
14         {
15             document.getElementById("target").addEventListener("click", handleClick, false);
16
17             if (!window.testRunner)
18                 return;
19             await UIHelper.doubleTapAt(50, 50);
20         }
21
22         function handleClick(event)
23         {
24             document.getElementById("target").textContent = "PASS: Click fired on element with handler.";
25             testRunner.notifyDone();
26         }
27     </script>
28     <style>
29         body {
30             margin: 0;
31         }
32         #target {
33             height: 100px;
34             width: 100px;
35             background-color: silver;
36         }
37     </style>
38 </head>
39 <body onload="runTest()">
40 <div id="target"></div>
41 <div id="description">This document is set up to enable fast clicks, because
42     it has not moved from its initial scale. Double tapping on the rectangle
43     above should send a click event, not trigger a zoom.</div>
44 </body>
45 </html>