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

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

Issue 2342743002: Revert cookies back to be domain scoped
Patch Set: Created 4 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
Index: chrome/browser/content_settings/host_content_settings_map_unittest.cc
diff --git a/chrome/browser/content_settings/host_content_settings_map_unittest.cc b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
index 1d5965b221626e8c761acc741860cc25c812350b..a81eadad69ef8505a3171490acea5dfb2c06f07d 100644
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
@@ -368,7 +368,7 @@ TEST_F(HostContentSettingsMapTest, Observer) {
GURL host("http://example.com/");
ContentSettingsPattern primary_pattern =
- ContentSettingsPattern::FromString("http://example.com:80");
+ ContentSettingsPattern::FromString("[*.]example.com");
ContentSettingsPattern secondary_pattern =
ContentSettingsPattern::Wildcard();
EXPECT_CALL(observer, OnContentSettingsChanged(host_content_settings_map,
@@ -949,7 +949,7 @@ TEST_F(HostContentSettingsMapTest, CanonicalizeExceptionsUnicodeOnly) {
base::DictionaryValue* dummy_payload = new base::DictionaryValue;
dummy_payload->SetInteger("setting", CONTENT_SETTING_ALLOW);
- all_settings_dictionary->SetWithoutPathExpansion("www.\xC4\x87ira.com,*",
+ all_settings_dictionary->SetWithoutPathExpansion("[*.]\xC4\x87ira.com,*",
dummy_payload);
}
@@ -959,9 +959,9 @@ TEST_F(HostContentSettingsMapTest, CanonicalizeExceptionsUnicodeOnly) {
prefs->GetDictionary(GetPrefName(CONTENT_SETTINGS_TYPE_COOKIES));
const base::DictionaryValue* result = NULL;
EXPECT_FALSE(all_settings_dictionary->GetDictionaryWithoutPathExpansion(
- "www.\xC4\x87ira.com,*", &result));
+ "[*.]\xC4\x87ira.com,*", &result));
EXPECT_TRUE(all_settings_dictionary->GetDictionaryWithoutPathExpansion(
- "www.xn--ira-ppa.com,*", &result));
+ "[*.]xn--ira-ppa.com,*", &result));
}
// If both Unicode and its punycode pattern exist, make sure we don't touch the
@@ -1214,7 +1214,7 @@ TEST_F(HostContentSettingsMapTest, AddContentSettingsObserver) {
GURL host("http://example.com/");
ContentSettingsPattern pattern =
- ContentSettingsPattern::FromString("http://example.com:80");
+ ContentSettingsPattern::FromString("[*.]example.com");
EXPECT_CALL(mock_observer, OnContentSettingChanged(
pattern, ContentSettingsPattern::Wildcard(),
CONTENT_SETTINGS_TYPE_COOKIES, ""));

Powered by Google App Engine
This is Rietveld 408576698