[Nav Experiment] Support async loading in PurgeCachedWebViewPages().
PurgeCachedWebViews() restores session history and wait for the first navigation after restore to stop loading before returning. However, if the first loading event happens asynchronously in the web view, PurgeCachedWebViews() would return before session restore is finished. This CL changes it to wait for the navigation finish event to handle this situation. This fixes NavigationTestCase//testRestoreHistoryToNTPAndNavigateForward when #slim-navigation-manager is used. Bug: 890385 Cq-Include-Trybots: luci.chromium.try:ios-simulator-cronet;luci.chromium.try:ios-simulator-full-configs Change-Id: I86913ed64ac0c6982fae48b71f0561f071b4db30 Reviewed-on: https://chromium-review.googlesource.com/c/1252850 Commit-Queue: Danyao Wang <danyao@chromium.org> Reviewed-by:Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#605091}
Showing
Please register or sign in to comment