• Alex Turner's avatar
    TestNavigationObserver: add option to not ignore uncommitted navigations · 79a4138f
    Alex Turner authored
    Currently, TestNavigationObserver ignores all uncommitted navigations,
    even though they pass through DidFinishNavigation. This can be confusing
    and does not allow tests to wait for a navigation that will not commit.
    
    We thus add an option for whether to ignore uncommitted navigations. To
    preserve existing functionality, it defaults to true (i.e. ignoring
    them). This functionality will be used in crrev.com/c/2348150 to wait
    for a navigation to a URL blocked by the subresource filter.
    
    Bug: 1021572
    Change-Id: Ic76f039eaa24cd41cae4cb63382060311e9860f7
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2596094
    Commit-Queue: Alex Turner <alexmt@chromium.org>
    Reviewed-by: default avatarNasko Oskov <nasko@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#838995}
    79a4138f
test_navigation_observer.cc 9.74 KB