• liaoyuke's avatar
    Create new pending item if UserAgentOverrideOption is not INHERIT. · fbb84a32
    liaoyuke authored
    The original logic in |AddPendingItem| does nothing if the URL of the
    pending item is the same as the last committed item, except that the
    pending item is added due to form submission.
    
    However, this doesn't work with the new Request Desktop/Mobile Site
    because the new functionality requires adding a pending item with the
    same URL, but different UserAgentType.
    
    This CL re-factors |AddPendingItem| so that a pending item with the
    same URL can be added successfully as long as the
    UserAgentOverrideOption is not INHEIRT.
    
    This CL also adds corresponding unit tests to test the logic.
    
    BUG=678047
    
    Review-Url: https://codereview.chromium.org/2794723002
    Cr-Commit-Position: refs/heads/master@{#462932}
    fbb84a32
navigation_manager_impl.mm 15.5 KB