Chromium Code Reviews| Index: content/browser/security_exploit_browsertest.cc |
| diff --git a/content/browser/security_exploit_browsertest.cc b/content/browser/security_exploit_browsertest.cc |
| index cf3b7f759ddf469ae49594a9e222b8cb07d94a9f..611e00d46c550bcd8027319d0a09691e5270404d 100644 |
| --- a/content/browser/security_exploit_browsertest.cc |
| +++ b/content/browser/security_exploit_browsertest.cc |
| @@ -73,15 +73,22 @@ RenderViewHostImpl* PrepareToDuplicateHosts(Shell* shell, |
| Referrer(), CURRENT_TAB, false, true); |
| // Since the navigation above requires a cross-process swap, there will be a |
| - // pending RenderViewHost. Ensure it exists and is in a different process |
| - // than the initial page. |
| - RenderViewHostImpl* pending_rvh = |
| - wc->GetRenderManagerForTesting()->pending_render_view_host(); |
| - EXPECT_TRUE(pending_rvh != NULL); |
| - EXPECT_NE(shell->web_contents()->GetRenderViewHost()->GetProcess()->GetID(), |
| - pending_rvh->GetProcess()->GetID()); |
| + // speculative/pending RenderViewHost. Ensure it exists and is in a different |
|
clamy
2015/06/10 12:30:27
s/RenderViewHost/RenderFrameHost
carlosk
2015/06/10 13:15:06
Done.
|
| + // process than the initial page. |
| + RenderFrameHostImpl* next_rfh; |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableBrowserSideNavigation)) { |
| + next_rfh = |
| + wc->GetRenderManagerForTesting()->speculative_frame_host_for_testing(); |
| + } else { |
| + next_rfh = wc->GetRenderManagerForTesting()->pending_frame_host(); |
| + } |
| + |
| + EXPECT_TRUE(next_rfh); |
| + EXPECT_NE(shell->web_contents()->GetRenderProcessHost()->GetID(), |
| + next_rfh->GetProcess()->GetID()); |
| - return pending_rvh; |
| + return next_rfh->render_view_host(); |
| } |
| } // namespace |