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

Unified Diff: chrome/browser/content_settings/cookie_settings_unittest.cc

Issue 535773002: Android: Remove more browser extensions code, including some that snuck back in. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/content_settings/host_content_settings_map.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/content_settings/cookie_settings_unittest.cc
diff --git a/chrome/browser/content_settings/cookie_settings_unittest.cc b/chrome/browser/content_settings/cookie_settings_unittest.cc
index 6e2f274d3ba5a808897f0e43e7c557d1df69c4ca..30b547f7e00d28c04e3add8ccbf9f10dcae3b8fa 100644
--- a/chrome/browser/content_settings/cookie_settings_unittest.cc
+++ b/chrome/browser/content_settings/cookie_settings_unittest.cc
@@ -122,12 +122,6 @@ TEST_F(CookieSettingsTest, CookiesThirdPartyBlockedExplicitAllow) {
kAllowedSite, kExtensionURL));
EXPECT_TRUE(cookie_settings_->IsSettingCookieAllowed(
kAllowedSite, kExtensionURL));
-
- // Extensions should always be allowed to use cookies.
- EXPECT_TRUE(cookie_settings_->IsReadingCookieAllowed(
- kAllowedSite, kExtensionURL));
- EXPECT_TRUE(cookie_settings_->IsSettingCookieAllowed(
- kAllowedSite, kExtensionURL));
}
TEST_F(CookieSettingsTest, CookiesThirdPartyBlockedAllSitesAllowed) {
@@ -266,9 +260,16 @@ TEST_F(CookieSettingsTest, ExtensionsRegularSettings) {
TEST_F(CookieSettingsTest, ExtensionsOwnCookies) {
cookie_settings_->SetDefaultCookieSetting(CONTENT_SETTING_BLOCK);
+#if defined(ENABLE_EXTENSIONS)
// Extensions can always use cookies (and site data) in their own origin.
EXPECT_TRUE(cookie_settings_->IsReadingCookieAllowed(
kExtensionURL, kExtensionURL));
+#else
+ // Except if extensions are disabled. Then the extension-specific checks do
+ // not exist and the default setting is to block.
+ EXPECT_FALSE(cookie_settings_->IsReadingCookieAllowed(
+ kExtensionURL, kExtensionURL));
+#endif
}
TEST_F(CookieSettingsTest, ExtensionsThirdParty) {
« no previous file with comments | « no previous file | chrome/browser/content_settings/host_content_settings_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698