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

Side by Side Diff: chrome/browser/renderer_host/test/site_instance_unittest.cc

Issue 3325012: Fix SessionStorage (Closed)
Patch Set: kill the last (new) dcheck Created 10 years, 3 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/stl_util-inl.h" 5 #include "base/stl_util-inl.h"
6 #include "base/string16.h" 6 #include "base/string16.h"
7 #include "chrome/browser/browsing_instance.h" 7 #include "chrome/browser/browsing_instance.h"
8 #include "chrome/browser/child_process_security_policy.h" 8 #include "chrome/browser/child_process_security_policy.h"
9 #include "chrome/browser/renderer_host/browser_render_process_host.h" 9 #include "chrome/browser/renderer_host/browser_render_process_host.h"
10 #include "chrome/browser/renderer_host/site_instance.h" 10 #include "chrome/browser/renderer_host/site_instance.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 EXPECT_EQ(1, browsingDeleteCounter); 112 EXPECT_EQ(1, browsingDeleteCounter);
113 // browsing_instance is now deleted 113 // browsing_instance is now deleted
114 114
115 // Ensure that instances are deleted when their RenderViewHosts are gone. 115 // Ensure that instances are deleted when their RenderViewHosts are gone.
116 scoped_ptr<TestingProfile> profile(new TestingProfile()); 116 scoped_ptr<TestingProfile> profile(new TestingProfile());
117 instance = 117 instance =
118 TestSiteInstance::CreateTestSiteInstance(profile.get(), 118 TestSiteInstance::CreateTestSiteInstance(profile.get(),
119 &siteDeleteCounter, 119 &siteDeleteCounter,
120 &browsingDeleteCounter); 120 &browsingDeleteCounter);
121 { 121 {
122 TabContents contents(profile.get(), instance, MSG_ROUTING_NONE, NULL); 122 TabContents contents(profile.get(), instance, MSG_ROUTING_NONE, NULL, NULL);
123 EXPECT_EQ(1, siteDeleteCounter); 123 EXPECT_EQ(1, siteDeleteCounter);
124 EXPECT_EQ(1, browsingDeleteCounter); 124 EXPECT_EQ(1, browsingDeleteCounter);
125 } 125 }
126 126
127 // Make sure that we flush any messages related to the above TabContents 127 // Make sure that we flush any messages related to the above TabContents
128 // destruction. 128 // destruction.
129 MessageLoop::current()->RunAllPending(); 129 MessageLoop::current()->RunAllPending();
130 130
131 EXPECT_EQ(2, siteDeleteCounter); 131 EXPECT_EQ(2, siteDeleteCounter);
132 EXPECT_EQ(2, browsingDeleteCounter); 132 EXPECT_EQ(2, browsingDeleteCounter);
(...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 GURL("chrome-extension://baz/bar"))); 520 GURL("chrome-extension://baz/bar")));
521 EXPECT_EQ(s5a, s5b); 521 EXPECT_EQ(s5a, s5b);
522 522
523 // The derived profiles with the different sites. 523 // The derived profiles with the different sites.
524 scoped_refptr<SiteInstance> s6a(instance1->GetSiteInstanceForURL( 524 scoped_refptr<SiteInstance> s6a(instance1->GetSiteInstanceForURL(
525 GURL("chrome-extension://baz/bar"))); 525 GURL("chrome-extension://baz/bar")));
526 scoped_refptr<SiteInstance> s6b(instance3->GetSiteInstanceForURL( 526 scoped_refptr<SiteInstance> s6b(instance3->GetSiteInstanceForURL(
527 GURL("chrome-extension://foo/boo"))); 527 GURL("chrome-extension://foo/boo")));
528 EXPECT_NE(s6a, s6b); 528 EXPECT_NE(s6a, s6b);
529 } 529 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_view_host_factory.cc ('k') | chrome/browser/renderer_host/test/test_render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698