| Index: content/test/test_web_contents.cc
|
| diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
|
| index 6a2e05e2b9cc805bcd8109b20f72f186841f8c35..82fe0c6c9bd687b1b8a3ded189f83868386866a3 100644
|
| --- a/content/test/test_web_contents.cc
|
| +++ b/content/test/test_web_contents.cc
|
| @@ -154,7 +154,8 @@ void TestWebContents::CommitPendingNavigation() {
|
| // proper renderer.
|
| old_rfh->PrepareForCommit(entry->GetURL());
|
|
|
| - TestRenderFrameHost* rfh = GetPendingMainFrame();
|
| + TestRenderFrameHost* rfh = GetNextMainFrameCandidate();
|
| +
|
| if (!rfh)
|
| rfh = old_rfh;
|
|
|
| @@ -227,6 +228,15 @@ void TestWebContents::TestDidFailLoadWithError(
|
| frame_tree_.root()->current_frame_host()->OnMessageReceived(msg);
|
| }
|
|
|
| +TestRenderFrameHost* TestWebContents::GetNextMainFrameCandidate() const {
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableBrowserSideNavigation)) {
|
| + return static_cast<TestRenderFrameHost*>(
|
| + GetRenderManager()->speculative_render_frame_host_.get());
|
| + }
|
| + return GetPendingMainFrame();
|
| +}
|
| +
|
| void TestWebContents::CreateNewWindow(
|
| int render_process_id,
|
| int route_id,
|
|
|