| Index: content/browser/frame_host/navigator_impl_unittest.cc
|
| diff --git a/content/browser/frame_host/navigator_impl_unittest.cc b/content/browser/frame_host/navigator_impl_unittest.cc
|
| index 97ae80f6f43f347af0cba8730284f4092aef956a..2fb5b6610ad007a58e5f2615561a5e97e5074f44 100644
|
| --- a/content/browser/frame_host/navigator_impl_unittest.cc
|
| +++ b/content/browser/frame_host/navigator_impl_unittest.cc
|
| @@ -109,10 +109,10 @@ class NavigatorTestWithBrowserSideNavigation
|
| return message && rfh->GetRoutingID() == message->routing_id();
|
| }
|
|
|
| - scoped_refptr<SiteInstance> ConvertToSiteInstance(
|
| + scoped_refptr<SiteInstanceImpl> ConvertToSiteInstance(
|
| RenderFrameHostManager* rfhm,
|
| const SiteInstanceDescriptor& descriptor,
|
| - SiteInstance* candidate_instance) {
|
| + SiteInstanceImpl* candidate_instance) {
|
| return rfhm->ConvertToSiteInstance(descriptor, candidate_instance);
|
| }
|
| };
|
| @@ -1017,7 +1017,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
|
| // Navigate to set a current SiteInstance on the RenderFrameHost.
|
| GURL kUrl1("http://a.com");
|
| contents()->NavigateAndCommit(kUrl1);
|
| - SiteInstance* current_instance = main_test_rfh()->GetSiteInstance();
|
| + SiteInstanceImpl* current_instance = main_test_rfh()->GetSiteInstance();
|
| ASSERT_TRUE(current_instance);
|
|
|
| // 1) Convert a descriptor pointing to the current instance.
|
| @@ -1025,7 +1025,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
|
| main_test_rfh()->frame_tree_node()->render_manager();
|
| {
|
| SiteInstanceDescriptor descriptor(current_instance);
|
| - scoped_refptr<SiteInstance> converted_instance =
|
| + scoped_refptr<SiteInstanceImpl> converted_instance =
|
| ConvertToSiteInstance(rfhm, descriptor, nullptr);
|
| EXPECT_EQ(current_instance, converted_instance);
|
| }
|
| @@ -1033,13 +1033,13 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
|
| // 2) Convert a descriptor pointing an instance unrelated to the current one,
|
| // with a different site.
|
| GURL kUrl2("http://b.com");
|
| - scoped_refptr<SiteInstance> unrelated_instance(
|
| - SiteInstance::CreateForURL(browser_context(), kUrl2));
|
| + scoped_refptr<SiteInstanceImpl> unrelated_instance(
|
| + SiteInstanceImpl::CreateForURL(browser_context(), kUrl2));
|
| EXPECT_FALSE(
|
| current_instance->IsRelatedSiteInstance(unrelated_instance.get()));
|
| {
|
| SiteInstanceDescriptor descriptor(unrelated_instance.get());
|
| - scoped_refptr<SiteInstance> converted_instance =
|
| + scoped_refptr<SiteInstanceImpl> converted_instance =
|
| ConvertToSiteInstance(rfhm, descriptor, nullptr);
|
| EXPECT_EQ(unrelated_instance.get(), converted_instance);
|
| }
|
| @@ -1050,7 +1050,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
|
| {
|
| SiteInstanceDescriptor descriptor(browser_context(), kUrlSameSiteAs1,
|
| SiteInstanceRelation::RELATED);
|
| - scoped_refptr<SiteInstance> converted_instance =
|
| + scoped_refptr<SiteInstanceImpl> converted_instance =
|
| ConvertToSiteInstance(rfhm, descriptor, nullptr);
|
| EXPECT_EQ(current_instance, converted_instance);
|
| }
|
| @@ -1058,7 +1058,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
|
| // 4) Convert a descriptor of a related instance with a site different from
|
| // the current one.
|
| GURL kUrlSameSiteAs2("http://www.b.com/foo");
|
| - scoped_refptr<SiteInstance> related_instance;
|
| + scoped_refptr<SiteInstanceImpl> related_instance;
|
| {
|
| SiteInstanceDescriptor descriptor(browser_context(), kUrlSameSiteAs2,
|
| SiteInstanceRelation::RELATED);
|
| @@ -1078,7 +1078,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
|
| {
|
| SiteInstanceDescriptor descriptor(browser_context(), kUrlSameSiteAs1,
|
| SiteInstanceRelation::UNRELATED);
|
| - scoped_refptr<SiteInstance> converted_instance_1 =
|
| + scoped_refptr<SiteInstanceImpl> converted_instance_1 =
|
| ConvertToSiteInstance(rfhm, descriptor, nullptr);
|
| // Should return a new instance, unrelated to the current one, set to the
|
| // provided site URL.
|
| @@ -1091,7 +1091,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
|
|
|
| // Does the same but this time using unrelated_instance as a candidate,
|
| // which has a different site.
|
| - scoped_refptr<SiteInstance> converted_instance_2 =
|
| + scoped_refptr<SiteInstanceImpl> converted_instance_2 =
|
| ConvertToSiteInstance(rfhm, descriptor, unrelated_instance.get());
|
| // Should return yet another new instance, unrelated to the current one, set
|
| // to the same site URL.
|
| @@ -1104,7 +1104,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
|
| converted_instance_2->GetSiteURL());
|
|
|
| // Converts once more but with |converted_instance_1| as a candidate.
|
| - scoped_refptr<SiteInstance> converted_instance_3 =
|
| + scoped_refptr<SiteInstanceImpl> converted_instance_3 =
|
| ConvertToSiteInstance(rfhm, descriptor, converted_instance_1.get());
|
| // Should return |converted_instance_1| because its site matches and it is
|
| // unrelated to the current SiteInstance.
|
| @@ -1116,7 +1116,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
|
| {
|
| SiteInstanceDescriptor descriptor(browser_context(), kUrlSameSiteAs2,
|
| SiteInstanceRelation::UNRELATED);
|
| - scoped_refptr<SiteInstance> converted_instance_1 =
|
| + scoped_refptr<SiteInstanceImpl> converted_instance_1 =
|
| ConvertToSiteInstance(rfhm, descriptor, related_instance.get());
|
| // Should return a new instance, unrelated to the current, set to the
|
| // provided site URL.
|
| @@ -1127,7 +1127,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation,
|
| EXPECT_EQ(SiteInstance::GetSiteForURL(browser_context(), kUrlSameSiteAs2),
|
| converted_instance_1->GetSiteURL());
|
|
|
| - scoped_refptr<SiteInstance> converted_instance_2 =
|
| + scoped_refptr<SiteInstanceImpl> converted_instance_2 =
|
| ConvertToSiteInstance(rfhm, descriptor, unrelated_instance.get());
|
| // Should return |unrelated_instance| because its site matches and it is
|
| // unrelated to the current SiteInstance.
|
|
|