blob: c3a9d5ae8e3ecbbbaa93f7e2901aa6d50d272355 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script src="../utils.js"></script>
<script>
'use strict';
target_test((target, test) => {
target.addEventListener("pointerdown", event => event.preventDefault());
const clicked = new Promise(resolve => target.addEventListener("click", resolve));
const tapped = ui.tap({ x: 100, y: 100 });
Promise.all([clicked, tapped]).then(() => test.done());
}, "A 'click' event is dispatched when tapping even if preventDefault() was called for a pointer event.");
</script>
</body>
</html>