Title: [261205] trunk/LayoutTests
- Revision
- 261205
- Author
- [email protected]
- Date
- 2020-05-05 16:12:30 -0700 (Tue, 05 May 2020)
Log Message
fast/overflow/horizontal-scroll-after-back.html is a flaky timeout on macOS
https://bugs.webkit.org/show_bug.cgi?id=211473
<rdar://problem/61180247>
Reviewed by Darin Adler.
I made the following changes to the test:
- Stop relying on 200ms timers and instead just a 0 timer after the load event.
- Detect the case where we failed to enter page cache and fail nicely in this
case instead of timing out.
- Use Element.click() to trigger the navigation instead of dispatching a custom
click event.
I have not been able to reproduce the flakiness locally. However, the changes in
this patch will at the very least make the test faster to run and cause the test
to fail instead of timing out if the issue is that we fail to enter the back /
forward cache, which would help us fix this.
* fast/overflow/horizontal-scroll-after-back.html:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (261204 => 261205)
--- trunk/LayoutTests/ChangeLog 2020-05-05 22:58:36 UTC (rev 261204)
+++ trunk/LayoutTests/ChangeLog 2020-05-05 23:12:30 UTC (rev 261205)
@@ -1,3 +1,25 @@
+2020-05-05 Chris Dumez <[email protected]>
+
+ fast/overflow/horizontal-scroll-after-back.html is a flaky timeout on macOS
+ https://bugs.webkit.org/show_bug.cgi?id=211473
+ <rdar://problem/61180247>
+
+ Reviewed by Darin Adler.
+
+ I made the following changes to the test:
+ - Stop relying on 200ms timers and instead just a 0 timer after the load event.
+ - Detect the case where we failed to enter page cache and fail nicely in this
+ case instead of timing out.
+ - Use Element.click() to trigger the navigation instead of dispatching a custom
+ click event.
+
+ I have not been able to reproduce the flakiness locally. However, the changes in
+ this patch will at the very least make the test faster to run and cause the test
+ to fail instead of timing out if the issue is that we fail to enter the back /
+ forward cache, which would help us fix this.
+
+ * fast/overflow/horizontal-scroll-after-back.html:
+
2020-05-05 Jason Lawrence <[email protected]>
REGRESSION: (r261113): [ Mac ] http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html is flaky failing.
Modified: trunk/LayoutTests/fast/overflow/horizontal-scroll-after-back.html (261204 => 261205)
--- trunk/LayoutTests/fast/overflow/horizontal-scroll-after-back.html 2020-05-05 22:58:36 UTC (rev 261204)
+++ trunk/LayoutTests/fast/overflow/horizontal-scroll-after-back.html 2020-05-05 23:12:30 UTC (rev 261205)
@@ -12,16 +12,13 @@
: "PASS";
document.body.innerHTML = result;
if (window.testRunner)
- testRunner.notifyDone();
+ testRunner.notifyDone();
}
function navigateAwayAndBack()
{
- // Simulate a link click to create a history entry
- var evt = document.createEvent("MouseEvents");
- evt.initMouseEvent("click", true, true, window,
- 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- document.getElementById('anchor').dispatchEvent(evt);
+ sessionStorage.horizontal_scroll_after_back_test_started = true;
+ document.getElementById('anchor').click();
}
function runTestStep()
@@ -30,17 +27,26 @@
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
- window.setTimeout("navigateAwayAndBack()", 200);
+ setTimeout("navigateAwayAndBack()", 0);
}
function onVerifyPage(evt)
{
+ if (!sessionStorage.horizontal_scroll_after_back_test_started)
+ return;
+ delete sessionStorage.horizontal_scroll_after_back_test_started;
+
// If pageshow is happening as result of navigation back then we proceed.
if (evt.persisted)
- setTimeout("verifyPage()", 200);
+ setTimeout("verifyPage()", 0);
+ else {
+ document.body.innerHTML = "FAIL: Page did not go into the back/forward cache";
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
}
-window._onpageshow_ = onVerifyPage;
+_onpageshow_ = onVerifyPage;
</script>
<head>
<style type="text/css">
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes