Chromium Code Reviews| Index: content/browser/web_contents/web_contents_impl_unittest.cc |
| diff --git a/content/browser/web_contents/web_contents_impl_unittest.cc b/content/browser/web_contents/web_contents_impl_unittest.cc |
| index d056e6ddfd6902bfd982d40b288436386f038e91..2fa4c809af8e84ea3af93c886713bdabc36ebd2f 100644 |
| --- a/content/browser/web_contents/web_contents_impl_unittest.cc |
| +++ b/content/browser/web_contents/web_contents_impl_unittest.cc |
| @@ -912,16 +912,20 @@ TEST_F(WebContentsImplTest, FindOpenerRVHWhenPending) { |
| url2, Referrer(), ui::PAGE_TRANSITION_TYPED, std::string()); |
| orig_rfh->PrepareForCommit(); |
| TestRenderFrameHost* pending_rfh = contents()->GetPendingMainFrame(); |
| + SiteInstance* instance = pending_rfh->GetSiteInstance(); |
| // While it is still pending, simulate opening a new tab with the first tab |
| // as its opener. This will call CreateOpenerProxies on the opener to ensure |
| // that an RVH exists. |
| - int opener_routing_id = contents()->GetRenderManager()->CreateOpenerProxies( |
| - pending_rfh->GetSiteInstance()); |
| - |
| - // We should find the pending RVH and not create a new one. |
| - EXPECT_EQ(pending_rfh->GetRenderViewHost()->GetRoutingID(), |
| - opener_routing_id); |
| + scoped_ptr<TestWebContents> popup( |
| + TestWebContents::Create(browser_context(), instance)); |
| + popup->SetOpener(contents()); |
| + contents()->GetRenderManager()->CreateOpenerProxies(instance); |
| + |
| + // We should find the pending RFH and not create a new one. |
|
nasko
2015/07/07 16:26:21
This is only valid in regular chrome, not with --s
alexmos
2015/07/08 04:42:18
Done - see my earlier discussion.
nasko
2015/07/08 09:35:19
Acknowledged.
|
| + int opener_frame_routing_id = |
| + popup->GetRenderManager()->GetOpenerRoutingID(instance); |
| + EXPECT_EQ(pending_rfh->GetRoutingID(), opener_frame_routing_id); |
| } |
| // Tests that WebContentsImpl uses the current URL, not the SiteInstance's site, |