Skip to content

Commit

Permalink
Switch to use WaitForLoadStop to fix flakiness.
Browse files Browse the repository at this point in the history
The use of TestNavigationManager was copied from old code.

(cherry picked from commit a69d2ff)

Fixed: 1311145,1283050,1283050
Change-Id: I5832708828d3a3a1014a1a03d7af5ee84a952bd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3556259
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Fergal Daly <fergal@chromium.org>
Cr-Original-Commit-Position: refs/heads/main@{#986375}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3558658
Reviewed-by: Ben Mason <benmason@chromium.org>
Commit-Queue: Ben Mason <benmason@chromium.org>
Cr-Commit-Position: refs/branch-heads/4951@{#881}
Cr-Branched-From: 27de622-refs/heads/main@{#982481}
  • Loading branch information
fergald authored and Chromium LUCI CQ committed Apr 19, 2022
1 parent 14cbfb4 commit fc6dc39
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions content/browser/back_forward_cache_browsertest.cc
Expand Up @@ -678,13 +678,12 @@ void BackForwardCacheBrowserTest::NavigateAndBlock(GURL url,
std::unique_ptr<URLLoaderInterceptor> url_interceptor =
URLLoaderInterceptor::SetupRequestFailForURL(url,
net::ERR_BLOCKED_BY_CLIENT);
TestNavigationManager manager(web_contents(), url);
if (history_offset) {
shell()->GoBackOrForward(history_offset);
} else {
shell()->LoadURL(url);
}
manager.WaitForNavigationFinished();
WaitForLoadStop(web_contents());
ASSERT_EQ(current_frame_host()->GetLastCommittedURL(), url);
ASSERT_TRUE(current_frame_host()->IsErrorDocument());
}
Expand Down

0 comments on commit fc6dc39

Please sign in to comment.