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

Side by Side Diff: chrome/browser/extensions/web_view_browsertest.cc

Issue 11147026: Initial refactor to get profiles to propagate storage partition details. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixing Android's BrowserContext. Created 8 years, 1 month 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/automation/automation_util.h" 5 #include "chrome/browser/automation/automation_util.h"
6 #include "chrome/browser/extensions/platform_app_browsertest_util.h" 6 #include "chrome/browser/extensions/platform_app_browsertest_util.h"
7 #include "chrome/browser/ui/browser_tabstrip.h" 7 #include "chrome/browser/ui/browser_tabstrip.h"
8 #include "chrome/test/base/ui_test_utils.h" 8 #include "chrome/test/base/ui_test_utils.h"
9 #include "chrome/test/base/test_launcher_utils.h" 9 #include "chrome/test/base/test_launcher_utils.h"
10 #include "content/public/browser/notification_service.h" 10 #include "content/public/browser/notification_service.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 EXPECT_TRUE(content::ExecuteJavaScript( 93 EXPECT_TRUE(content::ExecuteJavaScript(
94 source2->GetWebContents()->GetRenderViewHost(), std::wstring(), 94 source2->GetWebContents()->GetRenderViewHost(), std::wstring(),
95 cookie_script2)); 95 cookie_script2));
96 96
97 // Test the regular browser context to ensure we still have only one cookie. 97 // Test the regular browser context to ensure we still have only one cookie.
98 automation_util::GetCookies(GURL("http://localhost"), 98 automation_util::GetCookies(GURL("http://localhost"),
99 chrome::GetWebContentsAt(browser(), 0), 99 chrome::GetWebContentsAt(browser(), 0),
100 &cookie_size, &cookie_value); 100 &cookie_size, &cookie_value);
101 EXPECT_EQ("testCookie=1", cookie_value); 101 EXPECT_EQ("testCookie=1", cookie_value);
102 102
103 // Now, test the browser tags to ensure we have properly set the cookie and 103 // The default behavior is to combine browser tags with no explicit partition
Charlie Reis 2012/10/30 17:47:48 nit: webview tags :) Can you also add bug 138296
nasko 2012/10/30 19:55:25 Done.
104 // we have only one per browser tag and they are not the same. 104 // declaration into the same in-memory partition. Test the browser tags to
105 // ensure we have properly set the cookies and we have both cookies in both
106 // browser tags.
105 automation_util::GetCookies(GURL("http://localhost"), 107 automation_util::GetCookies(GURL("http://localhost"),
106 source1->GetWebContents(), 108 source1->GetWebContents(),
107 &cookie_size, &cookie_value); 109 &cookie_size, &cookie_value);
108 EXPECT_EQ("guest1=true", cookie_value); 110 EXPECT_EQ("guest1=true; guest2=true", cookie_value);
109 111
110 automation_util::GetCookies(GURL("http://localhost"), 112 automation_util::GetCookies(GURL("http://localhost"),
111 source2->GetWebContents(), 113 source2->GetWebContents(),
112 &cookie_size, &cookie_value); 114 &cookie_size, &cookie_value);
113 EXPECT_EQ("guest2=true", cookie_value); 115 EXPECT_EQ("guest1=true; guest2=true", cookie_value);
114 } 116 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698