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 62d3b62c674820a133f13cd26ed52bbca5d346cc..5fca4aea055f7bff1d3a4f72894f891d68f99eb0 100644 |
| --- a/content/browser/security_exploit_browsertest.cc |
| +++ b/content/browser/security_exploit_browsertest.cc |
| @@ -73,10 +73,19 @@ 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(); |
| + // speculative/pending RenderViewHost. Ensure it exists and is in a different |
| + // process than the initial page. |
| + RenderViewHostImpl* pending_rvh = nullptr; |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kEnableBrowserSideNavigation)) { |
| + RenderFrameHostImpl* speculative_rfh = |
| + wc->GetRenderManagerForTesting()->speculative_frame_host_for_testing(); |
| + if (speculative_rfh) |
| + pending_rvh = speculative_rfh->render_view_host(); |
| + } else { |
| + pending_rvh = wc->GetRenderManagerForTesting()->pending_render_view_host(); |
|
carlosk
2015/06/08 18:32:43
I didn't create an equivalent RFHM::speculative_re
|
| + } |
| + |
| EXPECT_TRUE(pending_rvh != NULL); |
| EXPECT_NE(shell->web_contents()->GetRenderViewHost()->GetProcess()->GetID(), |
| pending_rvh->GetProcess()->GetID()); |