blob: 37d1f81b15f59bd923bbd8bce3f850521ad3625f [file] [log] [blame]
<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<html>
<meta id="viewport-data" name="viewport" content="user-scalable=no, initial-scale=1.0">
<head>
<script id="ui-script" type="text/plain">
(function() {
var count = 0;
function fireSuccessiveTaps() {
if (count < 3)
uiController.singleTapAtPoint(50, 50, fireSuccessiveTaps);
else
uiController.uiScriptComplete("");
count++;
}
fireSuccessiveTaps();
})();
</script>
<script>
var scriptCompleted = false;
var clickCount = 0;
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function getUIScript() {
return document.getElementById("ui-script").text;
}
function runTest() {
if (testRunner.runUIScript) {
testRunner.runUIScript(getUIScript(), function(result) {
scriptCompleted = true;
if (clickCount == 3)
testRunner.notifyDone();
});
}
}
function handleClicked() {
clickCount++;
document.body.appendChild(document.createTextNode("Click!"));
document.body.appendChild(document.createElement("br"));
if (clickCount == 3 && scriptCompleted)
testRunner.notifyDone();
}
</script>
<style>
body {
margin: 0;
}
#target {
width: 100px;
height: 100px;
}
</style>
</head>
<body onload="runTest()">
<button id="target" onclick="handleClicked()"></button>
<p>Repeatedly tapping on the button should fire click events.</p>
<p>This test is best run in WebKitTestRunner. If you are running this test manually, verify that tapping the button causes a "Click!" message to appear below, and that click occurred without the regular 350ms delay for double tapping.</p>
</body>
</html>