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

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

Issue 385263004: Get rid of some uses of CreateIntegerValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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/content_settings_pref_provider_unittest.cc
diff --git a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
index a090372ad47d3c5ac6d267e2d5123611a9519fe7..9ad8bfbe544b220ec2b028455a1fb93670b569d7 100644
--- a/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
+++ b/chrome/browser/content_settings/content_settings_pref_provider_unittest.cc
@@ -123,7 +123,7 @@ TEST_F(PrefProviderTest, Observer) {
ContentSettingsPattern::Wildcard(),
CONTENT_SETTINGS_TYPE_IMAGES,
std::string(),
- base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW));
+ new base::FundamentalValue(CONTENT_SETTING_ALLOW));
pref_content_settings_provider.ShutdownOnUIThread();
}
@@ -172,7 +172,7 @@ TEST_F(PrefProviderTest, Incognito) {
pattern,
CONTENT_SETTINGS_TYPE_IMAGES,
std::string(),
- base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW));
+ new base::FundamentalValue(CONTENT_SETTING_ALLOW));
GURL host("http://example.com/");
// The value should of course be visible in the regular PrefProvider.
@@ -227,8 +227,7 @@ TEST_F(PrefProviderTest, GetContentSettingsValue) {
primary_pattern,
CONTENT_SETTINGS_TYPE_IMAGES,
std::string(),
- base::Value::CreateIntegerValue(
- CONTENT_SETTING_BLOCK));
+ new base::FundamentalValue(CONTENT_SETTING_BLOCK));
EXPECT_EQ(CONTENT_SETTING_BLOCK,
GetContentSetting(&provider,
primary_url,
@@ -290,7 +289,7 @@ TEST_F(PrefProviderTest, Patterns) {
pattern1,
CONTENT_SETTINGS_TYPE_IMAGES,
std::string(),
- base::Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
+ new base::FundamentalValue(CONTENT_SETTING_BLOCK));
EXPECT_EQ(CONTENT_SETTING_BLOCK,
GetContentSetting(&pref_content_settings_provider,
host1,
@@ -318,7 +317,7 @@ TEST_F(PrefProviderTest, Patterns) {
pattern2,
CONTENT_SETTINGS_TYPE_IMAGES,
std::string(),
- base::Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
+ new base::FundamentalValue(CONTENT_SETTING_BLOCK));
EXPECT_EQ(CONTENT_SETTING_BLOCK,
GetContentSetting(&pref_content_settings_provider,
host3,
@@ -339,7 +338,7 @@ TEST_F(PrefProviderTest, Patterns) {
pattern3,
CONTENT_SETTINGS_TYPE_IMAGES,
std::string(),
- base::Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
+ new base::FundamentalValue(CONTENT_SETTING_BLOCK));
EXPECT_EQ(CONTENT_SETTING_BLOCK,
GetContentSetting(&pref_content_settings_provider,
host4,
@@ -372,7 +371,7 @@ TEST_F(PrefProviderTest, ResourceIdentifier) {
pattern,
CONTENT_SETTINGS_TYPE_PLUGINS,
resource1,
- base::Value::CreateIntegerValue(CONTENT_SETTING_BLOCK));
+ new base::FundamentalValue(CONTENT_SETTING_BLOCK));
EXPECT_EQ(CONTENT_SETTING_BLOCK,
GetContentSetting(
&pref_content_settings_provider,
@@ -404,12 +403,11 @@ TEST_F(PrefProviderTest, AutoSubmitCertificateContentSetting) {
std::string(),
false));
- provider.SetWebsiteSetting(
- ContentSettingsPattern::FromURL(primary_url),
- ContentSettingsPattern::Wildcard(),
- CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
- std::string(),
- base::Value::CreateIntegerValue(CONTENT_SETTING_ALLOW));
+ provider.SetWebsiteSetting(ContentSettingsPattern::FromURL(primary_url),
+ ContentSettingsPattern::Wildcard(),
+ CONTENT_SETTINGS_TYPE_AUTO_SELECT_CERTIFICATE,
+ std::string(),
+ new base::FundamentalValue(CONTENT_SETTING_ALLOW));
EXPECT_EQ(CONTENT_SETTING_ALLOW,
GetContentSetting(
&provider,

Powered by Google App Engine
This is Rietveld 408576698