33 lines
960 B
HTML
33 lines
960 B
HTML
<!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
|
|
<html>
|
|
<head>
|
|
<meta charset=utf-8>
|
|
<meta name="viewport">
|
|
</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: "200px", height: "200px" }, (target, test) => {
|
|
document.body.style.width = "2000px";
|
|
document.body.style.height = "2000px";
|
|
|
|
target.style.touchAction = "none";
|
|
|
|
requestAnimationFrame(() => {
|
|
const initialPageScaleFactor = window.internals.pageScaleFactor();
|
|
ui.doubleTapToZoom({ x: 10, y: 10 }).then(() => {
|
|
assert_equals(window.internals.pageScaleFactor(), initialPageScaleFactor, "The page was not scaled.");
|
|
test.done();
|
|
});
|
|
})
|
|
|
|
}, "Testing that setting touch-action: none on an element prevents double tap to zoom.");
|
|
|
|
</script>
|
|
</body>
|
|
</html> |