Limit user-agent interactions based on the touch-action property on iOS
[WebKit-https.git] / LayoutTests / pointerevents / ios / touch-action-pinch-zoom-allows-zooming.html
1 <!DOCTYPE html><!-- webkit-test-runner [ useFlexibleViewport=true ] -->
2 <html>
3 <head>
4 <meta charset=utf-8>
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 </head>
7 <body>
8 <script src="../../resources/testharness.js"></script>
9 <script src="../../resources/testharnessreport.js"></script>
10 <script src="../utils.js"></script>
11 <script>
12
13 'use strict';
14
15 target_test({ width: "400px", height: "400px" }, (target, test) => {
16     document.body.style.width = "2000px";
17     document.body.style.height = "2000px";
18
19     target.style.touchAction = "pinch-zoom";
20
21     ui.pinchOut({ x: 50, y: 50, width: 100, height: 100, scale: 0.5 }).then(() => {
22         assert_not_equals(window.internals.pageScaleFactor(), 1, "The page was scaled.");
23         test.done();
24     });
25 }, "Testing that setting touch-action: pinch-zoom on an element allows page zooming.");
26
27 </script>
28 </body>
29 </html>