| Index: content/browser/frame_host/render_view_host_manager_unittest.cc
|
| diff --git a/content/browser/frame_host/render_view_host_manager_unittest.cc b/content/browser/frame_host/render_view_host_manager_unittest.cc
|
| index 1027a5277756c582d1ac23898fc251346387aa68..d3841abea193f0890368f7a72c2469a784782577 100644
|
| --- a/content/browser/frame_host/render_view_host_manager_unittest.cc
|
| +++ b/content/browser/frame_host/render_view_host_manager_unittest.cc
|
| @@ -566,7 +566,8 @@ TEST_F(RenderViewHostManagerTest, Init) {
|
|
|
| scoped_ptr<TestWebContents> web_contents(
|
| TestWebContents::Create(browser_context(), instance));
|
| - RenderViewHostManager manager(web_contents.get(), web_contents.get(),
|
| + RenderViewHostManager manager(web_contents->GetFrameTree()->root(),
|
| + web_contents.get(), web_contents.get(),
|
| web_contents.get());
|
|
|
| manager.Init(browser_context(), instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE);
|
| @@ -592,7 +593,8 @@ TEST_F(RenderViewHostManagerTest, Navigate) {
|
| Source<WebContents>(web_contents.get()));
|
|
|
| // Create.
|
| - RenderViewHostManager manager(web_contents.get(), web_contents.get(),
|
| + RenderViewHostManager manager(web_contents->GetFrameTree()->root(),
|
| + web_contents.get(), web_contents.get(),
|
| web_contents.get());
|
|
|
| manager.Init(browser_context(), instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE);
|
| @@ -684,7 +686,8 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyReNavigation) {
|
| Source<WebContents>(web_contents.get()));
|
|
|
| // Create.
|
| - RenderViewHostManager manager(web_contents.get(), web_contents.get(),
|
| + RenderViewHostManager manager(web_contents->GetFrameTree()->root(),
|
| + web_contents.get(), web_contents.get(),
|
| web_contents.get());
|
|
|
| manager.Init(browser_context(), instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE);
|
| @@ -827,7 +830,8 @@ TEST_F(RenderViewHostManagerTest, WebUI) {
|
|
|
| scoped_ptr<TestWebContents> web_contents(
|
| TestWebContents::Create(browser_context(), instance));
|
| - RenderViewHostManager manager(web_contents.get(), web_contents.get(),
|
| + RenderViewHostManager manager(web_contents->GetFrameTree()->root(),
|
| + web_contents.get(), web_contents.get(),
|
| web_contents.get());
|
|
|
| manager.Init(browser_context(), instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE);
|
| @@ -874,7 +878,8 @@ TEST_F(RenderViewHostManagerTest, WebUIInNewTab) {
|
| // Create a blank tab.
|
| scoped_ptr<TestWebContents> web_contents1(
|
| TestWebContents::Create(browser_context(), blank_instance));
|
| - RenderViewHostManager manager1(web_contents1.get(), web_contents1.get(),
|
| + RenderViewHostManager manager1(web_contents1->GetFrameTree()->root(),
|
| + web_contents1.get(), web_contents1.get(),
|
| web_contents1.get());
|
| manager1.Init(
|
| browser_context(), blank_instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE);
|
| @@ -904,7 +909,8 @@ TEST_F(RenderViewHostManagerTest, WebUIInNewTab) {
|
| // Now simulate clicking a link that opens in a new tab.
|
| scoped_ptr<TestWebContents> web_contents2(
|
| TestWebContents::Create(browser_context(), webui_instance));
|
| - RenderViewHostManager manager2(web_contents2.get(), web_contents2.get(),
|
| + RenderViewHostManager manager2(web_contents2->GetFrameTree()->root(),
|
| + web_contents2.get(), web_contents2.get(),
|
| web_contents2.get());
|
| manager2.Init(
|
| browser_context(), webui_instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE);
|
| @@ -1057,20 +1063,20 @@ TEST_F(RenderViewHostManagerTest, CreateSwappedOutOpenerRVHs) {
|
| rvh2->GetSiteInstance()));
|
|
|
| // Ensure rvh1 is placed on swapped out list of the current tab.
|
| - EXPECT_TRUE(manager->IsOnSwappedOutList(rvh1));
|
| + EXPECT_TRUE(manager->IsRVHOnSwappedOutList(rvh1));
|
| EXPECT_EQ(rvh1,
|
| manager->GetSwappedOutRenderViewHost(rvh1->GetSiteInstance()));
|
|
|
| // Ensure a swapped out RVH is created in the first opener tab.
|
| TestRenderViewHost* opener1_rvh = static_cast<TestRenderViewHost*>(
|
| opener1_manager->GetSwappedOutRenderViewHost(rvh2->GetSiteInstance()));
|
| - EXPECT_TRUE(opener1_manager->IsOnSwappedOutList(opener1_rvh));
|
| + EXPECT_TRUE(opener1_manager->IsRVHOnSwappedOutList(opener1_rvh));
|
| EXPECT_TRUE(opener1_rvh->is_swapped_out());
|
|
|
| // Ensure a swapped out RVH is created in the second opener tab.
|
| TestRenderViewHost* opener2_rvh = static_cast<TestRenderViewHost*>(
|
| opener2_manager->GetSwappedOutRenderViewHost(rvh2->GetSiteInstance()));
|
| - EXPECT_TRUE(opener2_manager->IsOnSwappedOutList(opener2_rvh));
|
| + EXPECT_TRUE(opener2_manager->IsRVHOnSwappedOutList(opener2_rvh));
|
| EXPECT_TRUE(opener2_rvh->is_swapped_out());
|
|
|
| // Navigate to a cross-BrowsingInstance URL.
|
| @@ -1166,7 +1172,7 @@ TEST_F(RenderViewHostManagerTest, EnableWebUIWithSwappedOutOpener) {
|
| // Ensure a swapped out RVH is created in the first opener tab.
|
| TestRenderViewHost* opener1_rvh = static_cast<TestRenderViewHost*>(
|
| opener1_manager->GetSwappedOutRenderViewHost(rvh2->GetSiteInstance()));
|
| - EXPECT_TRUE(opener1_manager->IsOnSwappedOutList(opener1_rvh));
|
| + EXPECT_TRUE(opener1_manager->IsRVHOnSwappedOutList(opener1_rvh));
|
| EXPECT_TRUE(opener1_rvh->is_swapped_out());
|
|
|
| // Ensure the new RVH has WebUI bindings.
|
| @@ -1184,7 +1190,8 @@ TEST_F(RenderViewHostManagerTest, NoSwapOnGuestNavigations) {
|
| TestWebContents::Create(browser_context(), instance));
|
|
|
| // Create.
|
| - RenderViewHostManager manager(web_contents.get(), web_contents.get(),
|
| + RenderViewHostManager manager(web_contents->GetFrameTree()->root(),
|
| + web_contents.get(), web_contents.get(),
|
| web_contents.get());
|
|
|
| manager.Init(browser_context(), instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE);
|
| @@ -1249,7 +1256,8 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyClose) {
|
| Source<WebContents>(web_contents.get()));
|
|
|
| // Create.
|
| - RenderViewHostManager manager(web_contents.get(), web_contents.get(),
|
| + RenderViewHostManager manager(web_contents->GetFrameTree()->root(),
|
| + web_contents.get(), web_contents.get(),
|
| web_contents.get());
|
|
|
| manager.Init(browser_context(), instance, MSG_ROUTING_NONE, MSG_ROUTING_NONE);
|
|
|