<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->

<html>
<meta name="viewport" content="initial-scale=0.98,width=device-width">
<head>
    <script src="../../../resources/ui-helper.js"></script>
    <script>
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.waitUntilDone();
        }

        async function runTest()
        {
            document.getElementById("target").addEventListener("click", handleClick, false);

            if (!window.testRunner)
                return;
            await UIHelper.doubleTapAt(50, 50);
        }

        function handleClick(event)
        {
            document.getElementById("target").textContent = "PASS: Click fired on element with handler.";
            testRunner.notifyDone();
        }
    </script>
    <style>
        body {
            margin: 0;
        }
        #target {
            height: 100px;
            width: 100px;
            background-color: silver;
        }
    </style>
</head>
<body onload="runTest()">
<div id="target"></div>
<div id="description">This document is set up to enable fast clicks, because
    it has not moved from its initial scale. Double tapping on the rectangle
    above should send a click event, not trigger a zoom.</div>
</body>
</html>
