blob: 310972a1e52d62d0e4437d6811ef7e9ee259f9a3 [file] [log] [blame]
<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
<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({ width: "400px", height: "400px" }, (target, test) => {
document.body.style.width = "2000px";
document.body.style.height = "2000px";
target.style.touchAction = "pinch-zoom";
const eventTracker = new EventTracker(target, ["pointerdown", "pointercancel"]);
ui.pinchOut({ x: 50, y: 50, width: 100, height: 100, scale: 0.5 }).then(() => {
eventTracker.assertMatchesEvents([
{ type: "pointerdown" },
{ type: "pointerdown" },
{ type: "pointercancel" },
{ type: "pointercancel" }
]);
test.done();
});
}, "Testing that pinching on an element with touch-action: pinch-zoom triggers a pointercancel event for each touch.");
</script>
</body>
</html>