| Index: content/browser/site_instance_unittest.cc
|
| ===================================================================
|
| --- content/browser/site_instance_unittest.cc (revision 92309)
|
| +++ content/browser/site_instance_unittest.cc (working copy)
|
| @@ -518,70 +518,3 @@
|
|
|
| STLDeleteContainerPointers(hosts.begin(), hosts.end());
|
| }
|
| -
|
| -// Test to ensure that profiles that derive from each other share site
|
| -// information.
|
| -TEST_F(SiteInstanceTest, GetSiteInstanceMap) {
|
| - int deleteCounter = 0;
|
| -
|
| - scoped_ptr<Profile> p1(new TestingProfile());
|
| - scoped_ptr<Profile> p2(new TestingProfile());
|
| - scoped_ptr<Profile> p3(new DerivedTestingProfile(p1.get()));
|
| -
|
| - // In this test, instances 1 and 2 will be deleted automatically when the
|
| - // SiteInstance objects they return are deleted. However, instance 3 never
|
| - // returns any SitesIntance objects in this test, so will not be automatically
|
| - // deleted. It must be deleted manually.
|
| - TestBrowsingInstance* instance1(new TestBrowsingInstance(p1.get(),
|
| - &deleteCounter));
|
| - TestBrowsingInstance* instance2(new TestBrowsingInstance(p2.get(),
|
| - &deleteCounter));
|
| - scoped_refptr<TestBrowsingInstance> instance3(
|
| - new TestBrowsingInstance(p3.get(), &deleteCounter));
|
| -
|
| - instance1->use_process_per_site = true;
|
| - instance2->use_process_per_site = true;
|
| - instance3->use_process_per_site = true;
|
| -
|
| - // The same profile with the same site.
|
| - scoped_refptr<SiteInstance> s1a(instance1->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://baz/bar")));
|
| - scoped_refptr<SiteInstance> s1b(instance1->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://baz/bar")));
|
| - EXPECT_EQ(s1a, s1b);
|
| -
|
| - // The same profile with different sites.
|
| - scoped_refptr<SiteInstance> s2a(instance1->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://baz/bar")));
|
| - scoped_refptr<SiteInstance> s2b(instance1->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://foo/boo")));
|
| - EXPECT_NE(s2a, s2b);
|
| -
|
| - // The different profiles with the same site.
|
| - scoped_refptr<SiteInstance> s3a(instance1->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://baz/bar")));
|
| - scoped_refptr<SiteInstance> s3b(instance2->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://baz/bar")));
|
| - EXPECT_NE(s3a, s3b);
|
| -
|
| - // The different profiles with different sites.
|
| - scoped_refptr<SiteInstance> s4a(instance1->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://baz/bar")));
|
| - scoped_refptr<SiteInstance> s4b(instance2->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://foo/boo")));
|
| - EXPECT_NE(s4a, s4b);
|
| -
|
| - // The derived profiles with the same site.
|
| - scoped_refptr<SiteInstance> s5a(instance1->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://baz/bar")));
|
| - scoped_refptr<SiteInstance> s5b(instance3->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://baz/bar")));
|
| - EXPECT_EQ(s5a, s5b);
|
| -
|
| - // The derived profiles with the different sites.
|
| - scoped_refptr<SiteInstance> s6a(instance1->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://baz/bar")));
|
| - scoped_refptr<SiteInstance> s6b(instance3->GetSiteInstanceForURL(
|
| - GURL("chrome-extension://foo/boo")));
|
| - EXPECT_NE(s6a, s6b);
|
| -}
|
|
|