[Nav Experiment] Introduce kLoadingPlaceholder state to error retry.
And also skips WebStateObserver::OnNavigationItemCommitted() callback if the navigation has a placeholder URL. These changes are helpful to differentiate a new request that hasn't started error handling state transitions, which means it may still succeed, and a request that has already failed and is in the middle of loading the error view. The differentiation is useful for integrating offline reading list with slim nav (crbug.com/840782). More directly, this change fixes VoiceSearchNavigationTest, which needs a placeholder entry to be loaded into the WebView before calling LoadHtml(), but the placeholder entry must not consume the WillLoadVoiceSearchResult() flag, which is cleared in OnNavigationItemCommitted callback. Parameterized VoiceSearchNavigationTest on both navigation manager implementations. This situation does not arise in production because LoadHtml() is a test only API. In production, placeholder URLs are only triggered for app-specific URL or error view, neither of which triggers OnNavigationItemCommitted on the placeholder load. Bug: 863026 Cq-Include-Trybots: luci.chromium.try:ios-simulator-full-configs;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: Ic4eda9f46b59886a2d24169b630aa8179373f7fb Reviewed-on: https://chromium-review.googlesource.com/1176240 Commit-Queue: Danyao Wang <danyao@chromium.org> Reviewed-by:Eugene But <eugenebut@chromium.org> Cr-Commit-Position: refs/heads/master@{#583898}
Showing
Please register or sign in to comment