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

<html>
<meta name="viewport" content="initial-scale=1.0">
<head>
    <script id="ui-script" type="text/plain">
        (function() {
            uiController.didEndZoomingCallback = function() {
                uiController.uiScriptComplete();
            };
            uiController.singleTapAtPoint(50, 50, function() {});
            uiController.singleTapAtPoint(50, 50, function() {});
        })();
    </script>
    <script>
        if (window.testRunner) {
            testRunner.dumpAsText();
            testRunner.waitUntilDone();
        }

        var target;

        function getUIScript()
        {
            return document.getElementById("ui-script").text;
        }

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

            if (!window.eventSender || !testRunner.runUIScript)
                return;

            testRunner.runUIScript(getUIScript(), function() {
                target.textContent = "PASS: Double tap caused zoom.";
                testRunner.notifyDone();
            });
        }

        function handleClick(event)
        {
            target.textContent = "FAIL: 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 disable fast clicks. Double
tapping on the rectangle above should zoom, not send a click event.</div>
</body>
</html>
