Fix pagehide tests synchronously loading a page during commit
[1] and related tests were triggering navigations and other actions synchronously during the RenderFrameHostChanged event, which happens before the new render frame host is properly committed. This could lead to issues as the one encountered in another CL's test [2], where the navigation triggered by test [1] would be seeded with an incomplete RenderFrameHost. This could be one source of the test flackiness on Android. This solves the issue by executing the script asynchronously. I had to leave the tests using postMessage with the synchronous behavior though, as the test would fail otherwise. [1] ProactivelySwapBrowsingInstancesSameSiteTest.NavigationAfterPagehideHistogram [2] https://ci.chromium.org/p/chromium/builders/try/linux-rel/525214? Change-Id: I7261ead90e46374a7787e4131e37bd3770141450 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2517359 Commit-Queue: Pâris Meuleman <pmeuleman@chromium.org> Reviewed-by:Rakina Zata Amni <rakina@chromium.org> Reviewed-by:
Arthur Sonzogni <arthursonzogni@chromium.org> Auto-Submit: Pâris Meuleman <pmeuleman@chromium.org> Cr-Commit-Position: refs/heads/master@{#825343}
Showing
Please register or sign in to comment