| 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 2b13d9444f82d87042d0f34e733075ece231d7eb..3102b19bdc368bca73759728a347386cd5cf6613 100644
|
| --- a/chrome/browser/content_settings/host_content_settings_map_unittest.cc
|
| +++ b/chrome/browser/content_settings/host_content_settings_map_unittest.cc
|
| @@ -325,11 +325,6 @@ TEST_F(HostContentSettingsMapTest, ObserveDefaultPref) {
|
| profile.GetHostContentSettingsMap();
|
|
|
| PrefService* prefs = profile.GetPrefs();
|
| -
|
| - // Make a copy of the default pref value so we can reset it later.
|
| - scoped_ptr<base::Value> default_value(prefs->FindPreference(
|
| - prefs::kDefaultContentSettings)->GetValue()->DeepCopy());
|
| -
|
| GURL host("http://example.com");
|
|
|
| host_content_settings_map->SetDefaultContentSetting(
|
| @@ -338,18 +333,14 @@ TEST_F(HostContentSettingsMapTest, ObserveDefaultPref) {
|
| host_content_settings_map->GetContentSetting(
|
| host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
|
|
|
| - // Make a copy of the pref's new value so we can reset it later.
|
| - scoped_ptr<base::Value> new_value(prefs->FindPreference(
|
| - prefs::kDefaultContentSettings)->GetValue()->DeepCopy());
|
| -
|
| // Clearing the backing pref should also clear the internal cache.
|
| - prefs->Set(prefs::kDefaultContentSettings, *default_value);
|
| + prefs->ClearPref(prefs::kDefaultImagesSetting);
|
| EXPECT_EQ(CONTENT_SETTING_ALLOW,
|
| host_content_settings_map->GetContentSetting(
|
| host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
|
|
|
| // Reseting the pref to its previous value should update the cache.
|
| - prefs->Set(prefs::kDefaultContentSettings, *new_value);
|
| + prefs->SetInteger(prefs::kDefaultImagesSetting, CONTENT_SETTING_BLOCK);
|
| EXPECT_EQ(CONTENT_SETTING_BLOCK,
|
| host_content_settings_map->GetContentSetting(
|
| host, host, CONTENT_SETTINGS_TYPE_IMAGES, std::string()));
|
|
|