Handle correctly start and commit of non-latest navigations

Desktop / Chromium - eugenebut [chromium.org] - 19 April 2017 14:07 EDT

Notable changes:- didStartProvisionalNavigation: is no op if passed navigation is not the latest navigation (this way didStartProvisionalNavigation: does not mess up with pending item)- didCommitNavigation: does not commit pending entry if if passed navigation is not the latest navigation. Instead it changes last committed item to one that matches with URL, which may not be correct, but it's just a minor temporary inconsistency which does not have any security implications (last committed URL is still correct).

BUG=711465

Review-Url: https://codereview.chromium.org/2821173002 Cr-Commit-Position: refs/heads/master@{#465669}

79d9b86 Handle correctly start and commit of non-latest navigations.
ios/chrome/browser/web/BUILD.gn | 1 +
ios/chrome/browser/web/visible_url_egtest.mm | 37 ++++++++
ios/web/navigation/crw_session_controller.h | 3 +-
ios/web/navigation/crw_session_controller.mm | 23 +++--
.../navigation/crw_session_controller_unittest.mm | 39 +++++---
.../navigation/navigation_manager_impl_unittest.mm | 30 +++----
ios/web/web_state/ui/crw_web_controller.mm | 100 ++++++++++++++-------
7 files changed, 165 insertions(+), 68 deletions(-)

Upstream: git.chromium.org


  • Share