• Danyao Wang's avatar
    [Nav Experiment] Update NavigationItem URL for location.replace. · 295cd31f
    Danyao Wang authored
    location.replace changes the URL of WKBackForwardListItem. Update the
    URL of NavigationItem to that of the host WKBackForwardListItem upon
    access. It's done this way because location.replace cannot be reliably
    distinguished from normal navigations in either WKNavigationDelegate
    callback or URL KVO.
    
    This fixes NavigationTestCase/testWindowLocationReplaceAndChangeHash.
    
    Bug: 807428
    Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
    Change-Id: Iaef4ed5efd788283050b43a3b4e988311ec9cf76
    Reviewed-on: https://chromium-review.googlesource.com/894490
    Commit-Queue: Danyao Wang <danyao@chromium.org>
    Reviewed-by: default avatarEugene But <eugenebut@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#533315}
    295cd31f
navigation_manager_impl_unittest.mm 108 KB