Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9b11ab322031299fd6af1cc22b20c882818756eb
https://github.com/WebKit/WebKit/commit/9b11ab322031299fd6af1cc22b20c882818756eb
Author: Chris Dumez <[email protected]>
Date: 2023-02-05 (Sun, 05 Feb 2023)
Changed paths:
M
LayoutTests/fast/loader/stateobjects/popstate-does-not-fire-with-page-cache-expected.txt
M
LayoutTests/fast/loader/stateobjects/popstate-does-not-fire-with-page-cache.html
M
LayoutTests/fast/loader/stateobjects/resources/popstate-does-not-fire-with-page-cache-1.html
M
LayoutTests/fast/loader/stateobjects/resources/popstate-does-not-fire-with-page-cache-2.html
M LayoutTests/platform/mac/TestExpectations
Log Message:
-----------
[ iOS BigSur+ ]
fast/loader/stateobjects/popstate-does-not-fire-with-page-cache.html is a flaky
failure.
https://bugs.webkit.org/show_bug.cgi?id=251312
rdar://104775065
Reviewed by Ryosuke Niwa.
The test would:
1. open a popup and load popstate-does-not-fire-with-page-cache-1.html in it
2. Call history.pushState() to create an extra history item in the popup
(popstate-does-not-fire-with-page-cache-1.html#)
3. Navigate the popup to popstate-does-not-fire-with-page-cache-2.html
4. Call history.back() to go back to
popstate-does-not-fire-with-page-cache-1.html#
5. Since the item would load from the back/forward cache, the test was relying
on the `pageshow` event inside the popup to determinate when the navigation
back had occurred (since no load event would fire).
6. When getting the `pageshow` event, the test would call history.back() again
in the popup to go back to the initial
popstate-does-not-fire-with-page-cache-1.html
7. The test would then expect a popstate event to get fired.
The test would flakily fail because the step 6 would trigger at the wrong time.
The issue was that we had set the pageshow event listener on
popstate-does-not-fire-with-page-cache-2.html
instead of popstate-does-not-fire-with-page-cache-1.html. Because we would call
`history.back()`
in a setTimeout(10), we would sometimes have navigated back to
popstate-does-not-fire-with-page-cache-1.html#
but not always. We really wanted to know when the back/forward cache navigation
back to
popstate-does-not-fire-with-page-cache-1.html# had occurred so that `pageshow`
event listener
needs to be on popstate-does-not-fire-with-page-cache-1.html.
*
LayoutTests/fast/loader/stateobjects/popstate-does-not-fire-with-page-cache-expected.txt:
*
LayoutTests/fast/loader/stateobjects/popstate-does-not-fire-with-page-cache.html:
*
LayoutTests/fast/loader/stateobjects/resources/popstate-does-not-fire-with-page-cache-1.html:
*
LayoutTests/fast/loader/stateobjects/resources/popstate-does-not-fire-with-page-cache-2.html:
* LayoutTests/platform/mac/TestExpectations:
Canonical link: https://commits.webkit.org/259873@main
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes