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 f779dd7b77e9bdeaf32223b08aacb1de2c456541..e8fd7c404340c4691b49ef90e9d2c0c4868c8255 100644 |
--- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc |
+++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc |
@@ -164,9 +164,6 @@ TEST_F(HostContentSettingsMapTest, DefaultValues) { |
EXPECT_EQ(CONTENT_SETTING_ALLOW, |
host_content_settings_map->GetDefaultContentSetting( |
CONTENT_SETTINGS_TYPE_POPUPS, NULL)); |
- EXPECT_EQ(CONTENT_SETTING_BLOCK, |
- host_content_settings_map->GetDefaultContentSetting( |
- CONTENT_SETTINGS_TYPE_KEYGEN, NULL)); |
} |
TEST_F(HostContentSettingsMapTest, IndividualSettings) { |
@@ -224,13 +221,6 @@ TEST_F(HostContentSettingsMapTest, IndividualSettings) { |
host, host, CONTENT_SETTINGS_TYPE_NOTIFICATIONS, std::string())); |
host_content_settings_map->SetContentSettingDefaultScope( |
- host, GURL(), CONTENT_SETTINGS_TYPE_KEYGEN, std::string(), |
- CONTENT_SETTING_ALLOW); |
- EXPECT_EQ(CONTENT_SETTING_ALLOW, |
- host_content_settings_map->GetContentSetting( |
- host, host, CONTENT_SETTINGS_TYPE_KEYGEN, std::string())); |
- |
- host_content_settings_map->SetContentSettingDefaultScope( |
host, GURL(), CONTENT_SETTINGS_TYPE_AUTOPLAY, std::string(), |
CONTENT_SETTING_BLOCK); |
EXPECT_EQ(CONTENT_SETTING_BLOCK, |
@@ -576,25 +566,6 @@ TEST_F(HostContentSettingsMapTest, HostTrimEndingDotCheck) { |
CONTENT_SETTINGS_TYPE_POPUPS, |
std::string())); |
- EXPECT_EQ(CONTENT_SETTING_BLOCK, |
- host_content_settings_map->GetContentSetting( |
- host_ending_with_dot, host_ending_with_dot, |
- CONTENT_SETTINGS_TYPE_KEYGEN, std::string())); |
- host_content_settings_map->SetContentSettingDefaultScope( |
- host_ending_with_dot, GURL(), CONTENT_SETTINGS_TYPE_KEYGEN, std::string(), |
- CONTENT_SETTING_ALLOW); |
- EXPECT_EQ(CONTENT_SETTING_ALLOW, |
- host_content_settings_map->GetContentSetting( |
- host_ending_with_dot, host_ending_with_dot, |
- CONTENT_SETTINGS_TYPE_KEYGEN, std::string())); |
- host_content_settings_map->SetContentSettingDefaultScope( |
- host_ending_with_dot, GURL(), CONTENT_SETTINGS_TYPE_KEYGEN, std::string(), |
- CONTENT_SETTING_DEFAULT); |
- EXPECT_EQ(CONTENT_SETTING_BLOCK, |
- host_content_settings_map->GetContentSetting( |
- host_ending_with_dot, host_ending_with_dot, |
- CONTENT_SETTINGS_TYPE_KEYGEN, std::string())); |
- |
EXPECT_EQ(CONTENT_SETTING_ALLOW, |
host_content_settings_map->GetContentSetting( |
host_ending_with_dot, host_ending_with_dot, |
@@ -1098,23 +1069,6 @@ TEST_F(HostContentSettingsMapTest, ManagedDefaultContentSetting) { |
host_content_settings_map->GetDefaultContentSetting( |
CONTENT_SETTINGS_TYPE_PLUGINS, NULL)); |
#endif |
- |
- EXPECT_EQ(CONTENT_SETTING_BLOCK, |
- host_content_settings_map->GetDefaultContentSetting( |
- CONTENT_SETTINGS_TYPE_KEYGEN, NULL)); |
- |
- // Set managed-default content setting through the coresponding preferences. |
- prefs->SetManagedPref(prefs::kManagedDefaultKeygenSetting, |
- new base::FundamentalValue(CONTENT_SETTING_ALLOW)); |
- EXPECT_EQ(CONTENT_SETTING_ALLOW, |
- host_content_settings_map->GetDefaultContentSetting( |
- CONTENT_SETTINGS_TYPE_KEYGEN, NULL)); |
- |
- // Remove managed-default content settings preferences. |
- prefs->RemoveManagedPref(prefs::kManagedDefaultKeygenSetting); |
- EXPECT_EQ(CONTENT_SETTING_BLOCK, |
- host_content_settings_map->GetDefaultContentSetting( |
- CONTENT_SETTINGS_TYPE_KEYGEN, NULL)); |
} |
TEST_F(HostContentSettingsMapTest, |
@@ -1368,56 +1322,6 @@ TEST_F(HostContentSettingsMapTest, GuestProfileMigration) { |
EXPECT_TRUE(all_settings_dictionary->empty()); |
} |
-TEST_F(HostContentSettingsMapTest, MigrateKeygenSettings) { |
- TestingProfile profile; |
- HostContentSettingsMap* host_content_settings_map = |
- HostContentSettingsMapFactory::GetForProfile(&profile); |
- |
- // Set old formatted settings. |
- GURL host("http://example.com/"); |
- ContentSettingsPattern pattern = |
- ContentSettingsPattern::FromURLNoWildcard(host); |
- |
- // Default setting is BLOCK. |
- EXPECT_EQ(CONTENT_SETTING_BLOCK, |
- host_content_settings_map->GetContentSetting( |
- host, host, CONTENT_SETTINGS_TYPE_KEYGEN, std::string())); |
- |
- host_content_settings_map->SetContentSettingCustomScope( |
- pattern, pattern, CONTENT_SETTINGS_TYPE_KEYGEN, std::string(), |
- CONTENT_SETTING_ALLOW); |
- // Because of the old formatted setting entry which has two same patterns, |
- // SetContentSetting() to (host, GURL()) will be ignored. |
- host_content_settings_map->SetContentSettingDefaultScope( |
- host, GURL(), CONTENT_SETTINGS_TYPE_KEYGEN, std::string(), |
- CONTENT_SETTING_BLOCK); |
- EXPECT_EQ(CONTENT_SETTING_ALLOW, |
- host_content_settings_map->GetContentSetting( |
- host, host, CONTENT_SETTINGS_TYPE_KEYGEN, std::string())); |
- |
- host_content_settings_map->MigrateKeygenSettings(); |
- |
- ContentSettingsForOneType settings; |
- host_content_settings_map->GetSettingsForOneType(CONTENT_SETTINGS_TYPE_KEYGEN, |
- std::string(), &settings); |
- for (const ContentSettingPatternSource& setting_entry : settings) { |
- EXPECT_EQ(setting_entry.secondary_pattern, |
- ContentSettingsPattern::Wildcard()); |
- } |
- |
- EXPECT_EQ(CONTENT_SETTING_ALLOW, |
- host_content_settings_map->GetContentSetting( |
- host, host, CONTENT_SETTINGS_TYPE_KEYGEN, std::string())); |
- |
- // After migrating old settings, changes to the setting works. |
- host_content_settings_map->SetContentSettingDefaultScope( |
- host, GURL(), CONTENT_SETTINGS_TYPE_KEYGEN, std::string(), |
- CONTENT_SETTING_BLOCK); |
- EXPECT_EQ(CONTENT_SETTING_BLOCK, |
- host_content_settings_map->GetContentSetting( |
- host, host, CONTENT_SETTINGS_TYPE_KEYGEN, std::string())); |
-} |
- |
TEST_F(HostContentSettingsMapTest, MigrateDomainScopedSettings) { |
TestingProfile profile; |
HostContentSettingsMap* host_content_settings_map = |