pointerevents/ios/touch-action-none-on-iframe.html times out
https://bugs.webkit.org/show_bug.cgi?id=213846
<rdar://problem/60393092>
Reviewed by Antti Koivisto.
The test pointerevents/ios/touch-action-none-on-iframe.html was mistakenly assuming that setting `touch-action: none` on
an <iframe> should prevent scrolling on the outer document with a swipe gesture over the inner document. We're renaming
this test as pointerevents/ios/touch-action-none-on-iframe-outer.html and modifying it to expect scrolling to occur, and
also make it a promise_test to avoid further timeouts due to failures in an async_test.
We also add a new test pointerevents/ios/touch-action-none-on-iframe-inner.html which sets `touch-action: none` on the
inner document which should indeed prevent scrolling of both the inner and outer documents.
* pointerevents/ios/touch-action-none-on-iframe-inner-expected.txt: Added.
* pointerevents/ios/touch-action-none-on-iframe-inner.html: Added.
* pointerevents/ios/touch-action-none-on-iframe-outer-expected.txt: Renamed from LayoutTests/pointerevents/ios/touch-action-none-on-iframe-expected.txt.
* pointerevents/ios/touch-action-none-on-iframe-outer.html: Renamed from LayoutTests/pointerevents/ios/touch-action-none-on-iframe.html.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@263804 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 549f8c2..5772b22 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,24 @@
+2020-07-01 Antoine Quint <graouts@webkit.org>
+
+ pointerevents/ios/touch-action-none-on-iframe.html times out
+ https://bugs.webkit.org/show_bug.cgi?id=213846
+ <rdar://problem/60393092>
+
+ Reviewed by Antti Koivisto.
+
+ The test pointerevents/ios/touch-action-none-on-iframe.html was mistakenly assuming that setting `touch-action: none` on
+ an <iframe> should prevent scrolling on the outer document with a swipe gesture over the inner document. We're renaming
+ this test as pointerevents/ios/touch-action-none-on-iframe-outer.html and modifying it to expect scrolling to occur, and
+ also make it a promise_test to avoid further timeouts due to failures in an async_test.
+
+ We also add a new test pointerevents/ios/touch-action-none-on-iframe-inner.html which sets `touch-action: none` on the
+ inner document which should indeed prevent scrolling of both the inner and outer documents.
+
+ * pointerevents/ios/touch-action-none-on-iframe-inner-expected.txt: Added.
+ * pointerevents/ios/touch-action-none-on-iframe-inner.html: Added.
+ * pointerevents/ios/touch-action-none-on-iframe-outer-expected.txt: Renamed from LayoutTests/pointerevents/ios/touch-action-none-on-iframe-expected.txt.
+ * pointerevents/ios/touch-action-none-on-iframe-outer.html: Renamed from LayoutTests/pointerevents/ios/touch-action-none-on-iframe.html.
+
2020-07-01 Karl Rackler <rackler@apple.com>
Remove expectation for fast/dom/Window/open-invalid-url.html and fast/dom/Range/simple-line-layout-getclientrects.html and fast/dom/attr_dead_doc.html and fast/dom/horizontal-scrollbar-when-dir-change.html and fast/dom/vertical-scrollbar-when-dir-change.html as they are passing.
diff --git a/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-expected.txt b/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-expected.txt
deleted file mode 100644
index 46751bd..0000000
--- a/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-expected.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-PASS Testing that setting touch-action: none on an iframe and interacting with its content prevents page scrolling.
-
diff --git a/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-inner-expected.txt b/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-inner-expected.txt
new file mode 100644
index 0000000..5021e5b
--- /dev/null
+++ b/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-inner-expected.txt
@@ -0,0 +1,4 @@
+
+
+PASS Testing that setting touch-action: none on an iframe's content and interacting with it does prevents page scrolling.
+
diff --git a/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-inner.html b/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-inner.html
new file mode 100644
index 0000000..8176f7b
--- /dev/null
+++ b/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-inner.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<style>
+
+iframe {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 400px;
+ height: 400px;
+}
+
+</style>
+</head>
+<body>
+<iframe></iframe>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../utils.js"></script>
+<script>
+
+'use strict';
+
+promise_test(async () => {
+ const body = document.body;
+ body.style.width = `${window.innerWidth * 2}px`;
+ body.style.height = `${window.innerHeight * 2}px`;
+
+ const iframe = body.firstElementChild;
+ const target = iframe.contentDocument.body.appendChild(document.createElement("div"));
+ target.setAttribute("style", `
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ touch-action: none;
+ `);
+
+ await new Promise(resolve => setTimeout(resolve, 100));
+ await ui.swipe({ x: 150, y: 150 }, { x: 50, y: 50 });
+ assert_equals(window.pageXOffset, 0, "The page was not scrolled in the x-axis.");
+ assert_equals(window.pageYOffset, 0, "The page was not scrolled in the y-axis.");
+}, "Testing that setting touch-action: none on an iframe's content and interacting with it does prevents page scrolling.");
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-outer-expected.txt b/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-outer-expected.txt
new file mode 100644
index 0000000..7a5c02a
--- /dev/null
+++ b/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-outer-expected.txt
@@ -0,0 +1,4 @@
+
+
+PASS Testing that setting touch-action: none on an iframe and interacting with its content does not prevent page scrolling.
+
diff --git a/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-outer.html b/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-outer.html
new file mode 100644
index 0000000..26f216a
--- /dev/null
+++ b/LayoutTests/pointerevents/ios/touch-action-none-on-iframe-outer.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset=utf-8>
+<meta name="viewport" content="width=device-width, initial-scale=1">
+<style>
+
+iframe {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 400px;
+ height: 400px;
+ touch-action: none;
+}
+
+</style>
+</head>
+<body>
+<iframe></iframe>
+<script src="../../resources/testharness.js"></script>
+<script src="../../resources/testharnessreport.js"></script>
+<script src="../utils.js"></script>
+<script>
+
+'use strict';
+
+promise_test(async () => {
+ const body = document.body;
+ body.style.width = `${window.innerWidth * 2}px`;
+ body.style.height = `${window.innerHeight * 2}px`;
+
+ const iframe = body.firstElementChild;
+ const target = iframe.contentDocument.body.appendChild(document.createElement("div"));
+ target.setAttribute("style", `
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ `);
+
+ await new Promise(resolve => setTimeout(resolve, 100));
+ await ui.swipe({ x: 150, y: 150 }, { x: 50, y: 50 });
+ assert_not_equals(window.pageXOffset, 0, "The page was scrolled in the x-axis.");
+ assert_not_equals(window.pageYOffset, 0, "The page was scrolled in the y-axis.");
+}, "Testing that setting touch-action: none on an iframe and interacting with its content does not prevent page scrolling.");
+
+</script>
+</body>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/pointerevents/ios/touch-action-none-on-iframe.html b/LayoutTests/pointerevents/ios/touch-action-none-on-iframe.html
deleted file mode 100644
index d927ea8..0000000
--- a/LayoutTests/pointerevents/ios/touch-action-none-on-iframe.html
+++ /dev/null
@@ -1,48 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<meta charset=utf-8>
-<meta name="viewport" content="width=device-width, initial-scale=1">
-<style>
-
-iframe {
- position: absolute;
- left: 0;
- top: 0;
- width: 400px;
- height: 400px;
- touch-action: none;
-}
-
-</style>
-</head>
-<body>
-<iframe></iframe>
-<script src="../../resources/testharness.js"></script>
-<script src="../../resources/testharnessreport.js"></script>
-<script src="../utils.js"></script>
-<script>
-
-'use strict';
-
-async_test(test => {
- const iframe = document.body.firstElementChild;
- const target = iframe.contentDocument.body.appendChild(document.createElement("div"));
- target.setAttribute("style", `
- position: absolute;
- left: 0;
- top: 0;
- width: 200%;
- height: 200%;
- `);
-
- ui.swipe({ x: 150, y: 150 }, { x: 50, y: 50 }).then(() => {
- assert_equals(window.pageXOffset, 0, "The page was not scrolled in the x-axis.");
- assert_equals(window.pageYOffset, 0, "The page was not scrolled in the y-axis.");
- test.done();
- });
-}, "Testing that setting touch-action: none on an iframe and interacting with its content prevents page scrolling.");
-
-</script>
-</body>
-</html>
\ No newline at end of file