summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/pointerevents/pointerevent_touch-action-none-on-body-when-style-propagates-to-viewport_touc...
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/pointerevents/pointerevent_touch-action-none-on-body-when-style-propagates-to-viewport_touch.html
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/pointerevents/pointerevent_touch-action-none-on-body-when-style-propagates-to-viewport_touch.html')
-rw-r--r--testing/web-platform/tests/pointerevents/pointerevent_touch-action-none-on-body-when-style-propagates-to-viewport_touch.html90
1 files changed, 90 insertions, 0 deletions
diff --git a/testing/web-platform/tests/pointerevents/pointerevent_touch-action-none-on-body-when-style-propagates-to-viewport_touch.html b/testing/web-platform/tests/pointerevents/pointerevent_touch-action-none-on-body-when-style-propagates-to-viewport_touch.html
new file mode 100644
index 0000000000..b2a3a9326e
--- /dev/null
+++ b/testing/web-platform/tests/pointerevents/pointerevent_touch-action-none-on-body-when-style-propagates-to-viewport_touch.html
@@ -0,0 +1,90 @@
+<!DOCTYPE html>
+<html>
+<title>Touch Action None on body when style propagates from body to viewport</title>
+<head>
+ <style>
+ html {
+ touch-action: none;
+ }
+ body {
+ overflow: auto;
+ }
+ </style>
+ <link rel="help" href="crbug.com/1031745">
+ <link rel="help" href="https://drafts.csswg.org/css-overflow-3/#overflow-propagation">
+ <link rel="help" href="https://w3c.github.io/pointerevents/#determining-supported-touch-behavior">
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/resources/testdriver.js"></script>
+ <script src="/resources/testdriver-actions.js"></script>
+ <script src="/resources/testdriver-vendor.js"></script>
+ <script src="pointerevent_support.js"></script>
+</head>
+<body onload="onLoad()">
+ <h2>Pointer Events touch-action none on body when style propagates from body to viewport</h2>
+ <h4>Test Description: Try to touch scroll. You shouldn't be able to.</h4>
+ <p>Note: this test is for touch only</p>
+ Body with touch-action=none.
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <p>Paragraph with touch-action=none</p>
+ <script>
+ function onLoad(){
+ var body = document.body;
+
+ if(!window.promise_test)
+ return;
+
+ promise_test(function(t){
+ return new Promise(async function(resolve,reject){
+ await touchScrollInTarget(body, 'down');
+ await touchScrollInTarget(body, 'right');
+ t.step(function(){
+ assert_equals(document.scrollingElement.scrollLeft, 0, "scrollingElement scroll x offset should be 0 in the end of the test");
+ assert_equals(document.scrollingElement.scrollTop, 0, "scrollingElement scroll y offset should be 0 in the end of the test");
+ });
+ resolve();
+ }).then(
+ ()=>{t.done();},
+ ()=>{t.done();}
+ );}, "touch-action none on body when style propagates to viewport");
+ }
+ </script>
+</body>
+</html>