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.

Fixed: 1311145,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-Commit-Position: refs/heads/main@{#986375}
  • Loading branch information
fergald authored and Chromium LUCI CQ committed Mar 29, 2022
1 parent 30523fd commit a69d2ff
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions content/browser/back_forward_cache_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -683,13 +683,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 a69d2ff

Please sign in to comment.