Title: [280937] trunk/LayoutTests
- Revision
- 280937
- Author
- [email protected]
- Date
- 2021-08-11 16:51:07 -0700 (Wed, 11 Aug 2021)
Log Message
[ iOS ] fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=228672
rdar://81348960
Reviewed by Simon Fraser.
On rare occasion, this test times out when the synthesized swipe gesture fails to cause the scrollable overflow
container to scroll past an arbitrary scroll position threshold (previously 400px). Mitigate this by rewriting
the test, such that we'll swipe _until_ we scroll past the threshold (which has also been lowered to just
100px).
Additionally, rewrite parts of this test to be generally easier to follow; for example, remove the scroll event
listener and instead just synthesize swipe gestures until `scroller.scrollTop` crosses 100px.
* fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body-expected.txt:
* fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html:
* platform/ios-wk2/TestExpectations: Remove the failing test expectation.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (280936 => 280937)
--- trunk/LayoutTests/ChangeLog 2021-08-11 22:54:12 UTC (rev 280936)
+++ trunk/LayoutTests/ChangeLog 2021-08-11 23:51:07 UTC (rev 280937)
@@ -1,3 +1,23 @@
+2021-08-11 Wenson Hsieh <[email protected]>
+
+ [ iOS ] fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html is a flaky timeout
+ https://bugs.webkit.org/show_bug.cgi?id=228672
+ rdar://81348960
+
+ Reviewed by Simon Fraser.
+
+ On rare occasion, this test times out when the synthesized swipe gesture fails to cause the scrollable overflow
+ container to scroll past an arbitrary scroll position threshold (previously 400px). Mitigate this by rewriting
+ the test, such that we'll swipe _until_ we scroll past the threshold (which has also been lowered to just
+ 100px).
+
+ Additionally, rewrite parts of this test to be generally easier to follow; for example, remove the scroll event
+ listener and instead just synthesize swipe gestures until `scroller.scrollTop` crosses 100px.
+
+ * fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body-expected.txt:
+ * fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html:
+ * platform/ios-wk2/TestExpectations: Remove the failing test expectation.
+
2021-08-11 Chris Dumez <[email protected]>
http/tests/xmlhttprequest/interactive-state.html is flaky
Modified: trunk/LayoutTests/fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body-expected.txt (280936 => 280937)
--- trunk/LayoutTests/fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body-expected.txt 2021-08-11 22:54:12 UTC (rev 280936)
+++ trunk/LayoutTests/fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body-expected.txt 2021-08-11 23:51:07 UTC (rev 280937)
@@ -1,10 +1,11 @@
-Verifies that tapping outside of a subscrollable region during momentum scrolling dispatches click events. To run the test manually, swipe up on the black box to scroll it; while scrolling, tap outside of the scrollable area. The page should observe click events.
+Tap here
+Verifies that tapping outside of a subscrollable region during momentum scrolling dispatches click events. To run the test manually, swipe up on the black box to scroll it; while scrolling, tap the red box and verify that a click event is dispatched.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-PASS scroller.scrollTop passed 400
-PASS Observed click event.
+PASS scrolled to minimum threshold
+PASS observedClick is true
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html (280936 => 280937)
--- trunk/LayoutTests/fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html 2021-08-11 22:54:12 UTC (rev 280936)
+++ trunk/LayoutTests/fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html 2021-08-11 23:51:07 UTC (rev 280937)
@@ -14,7 +14,7 @@
#scroller {
width: 100%;
- height: 50%;
+ height: 250px;
overflow: scroll;
border: 4px solid black;
box-sizing: border-box;
@@ -29,9 +29,13 @@
}
#target {
- width: 100%;
- height: 50px;
- margin-top: 1em;
+ width: 100px;
+ height: 100px;
+ margin-top: 50px;
+ background-color: tomato;
+ color: white;
+ line-height: 100px;
+ text-align: center;
}
</style>
<body _onload_="runTest()">
@@ -38,50 +42,36 @@
<div id="scroller">
<div id="content"></div>
</div>
- <div id="target"></div>
+ <div id="target">Tap here</div>
<p id="description"></p>
<p id="console"></p>
</body>
<script>
jsTestIsAsync = true;
+observedClick = false;
-let reachedMinimumScrollPosition = false;
-const minimumExpectedScrollTop = 400;
+const minimumExpectedScrollTop = 100;
const scroller = document.getElementById("scroller");
+const target = document.getElementById("target");
+async function runTest()
+{
+ target.addEventListener("click", () => observedClick = true);
-scroller.addEventListener("scroll", observeScrollEvent);
-document.body.addEventListener("click", () => {
- testPassed("Observed click event.");
- noteTestProgress();
-}, { once: true });
+ description("Verifies that tapping outside of a subscrollable region during momentum scrolling dispatches click events. To run the test manually, swipe up on the black box to scroll it; while scrolling, tap the red box and verify that a click event is dispatched.");
-function noteTestProgress() {
- if (!window.progress)
- progress = 0;
- if (++progress == 3)
- finishJSTest();
-}
+ while (scroller.scrollTop < minimumExpectedScrollTop) {
+ if (window.testRunner)
+ await UIHelper.dragFromPointToPoint(250, 200, 250, 20, 0.1);
+ await UIHelper.delayFor(200);
+ }
-async function observeScrollEvent() {
- if (!window.testRunner || scroller.scrollTop < minimumExpectedScrollTop || reachedMinimumScrollPosition)
- return;
+ testPassed("scrolled to minimum threshold");
- reachedMinimumScrollPosition = true;
- testPassed(`scroller.scrollTop passed ${minimumExpectedScrollTop}`);
- removeEventListener("scroll", observeScrollEvent);
- await UIHelper.activateElement(document.getElementById("target"));
- noteTestProgress();
-}
+ if (window.testRunner)
+ await UIHelper.activateElement(target);
-async function runTest()
-{
- description("Verifies that tapping outside of a subscrollable region during momentum scrolling dispatches click events. To run the test manually, swipe up on the black box to scroll it; while scrolling, tap outside of the scrollable area. The page should observe click events.");
-
- if (!window.testRunner)
- return;
-
- await UIHelper.dragFromPointToPoint(160, 200, 160, 50, 0.1);
- noteTestProgress();
+ shouldBe("observedClick", "true");
+ finishJSTest();
}
</script>
</html>
Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (280936 => 280937)
--- trunk/LayoutTests/platform/ios-wk2/TestExpectations 2021-08-11 22:54:12 UTC (rev 280936)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations 2021-08-11 23:51:07 UTC (rev 280937)
@@ -1850,8 +1850,6 @@
webkit.org/b/214598 fast/scrolling/ios/autoscroll-input-when-very-zoomed.html [ Pass Failure ]
-webkit.org/b/228672 fast/scrolling/ios/click-events-during-momentum-scroll-in-overflow-after-tap-on-body.html [ Pass Timeout ]
-
http/tests/in-app-browser-privacy/ [ Pass ]
webkit.org/b/175193 fast/images/async-image-body-background-image.html [ Pass Timeout ]
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes