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

Unified Diff: chrome/browser/extensions/web_view_browsertest.cc

Issue 11320018: Fixing guest processes to use the proper storage partition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing storage to be in-memory only. Created 8 years, 2 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
Index: chrome/browser/extensions/web_view_browsertest.cc
diff --git a/chrome/browser/extensions/web_view_browsertest.cc b/chrome/browser/extensions/web_view_browsertest.cc
index 2849cf459cb8c85d61829c686f97156c5f9713bb..190a0986de343fc5ef10a519b6e73b2c4cecec39 100644
--- a/chrome/browser/extensions/web_view_browsertest.cc
+++ b/chrome/browser/extensions/web_view_browsertest.cc
@@ -86,6 +86,9 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, Isolation) {
EXPECT_TRUE(source2->GetWebContents()->GetRenderProcessHost()->IsGuest());
EXPECT_NE(source1->GetWebContents()->GetRenderProcessHost()->GetID(),
source2->GetWebContents()->GetRenderProcessHost()->GetID());
+ EXPECT_EQ(
+ source1->GetWebContents()->GetRenderProcessHost()->GetStoragePartition(),
+ source2->GetWebContents()->GetRenderProcessHost()->GetStoragePartition());
Charlie Reis 2012/10/27 00:48:27 The real bug was that the guest's StoragePartition
EXPECT_TRUE(content::ExecuteJavaScript(
source1->GetWebContents()->GetRenderViewHost(), std::wstring(),
@@ -100,15 +103,17 @@ IN_PROC_BROWSER_TEST_F(WebViewTest, Isolation) {
&cookie_size, &cookie_value);
EXPECT_EQ("testCookie=1", cookie_value);
- // Now, test the browser tags to ensure we have properly set the cookie and
- // we have only one per browser tag and they are not the same.
+ // The default behavior is to combine browser tags with no explicit partition
+ // declaration into the same in-memory partition. Test the browser tags to
+ // ensure we have properly set the cookies and we have both cookies in both
+ // browser tags.
automation_util::GetCookies(GURL("http://localhost"),
source1->GetWebContents(),
&cookie_size, &cookie_value);
- EXPECT_EQ("guest1=true", cookie_value);
+ EXPECT_EQ("guest1=true; guest2=true", cookie_value);
automation_util::GetCookies(GURL("http://localhost"),
source2->GetWebContents(),
&cookie_size, &cookie_value);
- EXPECT_EQ("guest2=true", cookie_value);
+ EXPECT_EQ("guest1=true; guest2=true", cookie_value);
}

Powered by Google App Engine
This is Rietveld 408576698