Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(966)

Unified Diff: content/browser/site_instance_unittest.cc

Issue 7346024: Get rid of the ProfileId. It was added for ceee. I reverted the original change, since it led to ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/browsing_instance.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
-}
« no previous file with comments | « content/browser/browsing_instance.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698