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

Unified Diff: chrome/browser/prefs/pref_model_associator_unittest.cc

Issue 388963002: Get rid of the rest of CreateStringValue (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix bad 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
« no previous file with comments | « chrome/browser/prefs/pref_hash_filter_unittest.cc ('k') | chrome/browser/prefs/proxy_policy_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/pref_model_associator_unittest.cc
diff --git a/chrome/browser/prefs/pref_model_associator_unittest.cc b/chrome/browser/prefs/pref_model_associator_unittest.cc
index 0c9d45bd57eaef2df74eb9e4336cb89460cc5feb..203e4a71f68a795867727be9827901c00c3675f4 100644
--- a/chrome/browser/prefs/pref_model_associator_unittest.cc
+++ b/chrome/browser/prefs/pref_model_associator_unittest.cc
@@ -62,8 +62,8 @@ class ListPreferenceMergeTest : public AbstractPreferenceMergeTest {
virtual void SetUp() {
AbstractPreferenceMergeTest::SetUp();
- server_url_list_.Append(base::Value::CreateStringValue(server_url0_));
- server_url_list_.Append(base::Value::CreateStringValue(server_url1_));
+ server_url_list_.Append(new base::StringValue(server_url0_));
+ server_url_list_.Append(new base::StringValue(server_url1_));
}
std::string server_url0_;
@@ -77,8 +77,7 @@ TEST_F(ListPreferenceMergeTest, NotListOrDictionary) {
pref_service_->SetString(prefs::kHomePage, local_url0_);
const PrefService::Preference* pref =
pref_service_->FindPreference(prefs::kHomePage);
- scoped_ptr<base::Value> server_value(
- base::Value::CreateStringValue(server_url0_));
+ scoped_ptr<base::Value> server_value(new base::StringValue(server_url0_));
scoped_ptr<base::Value> merged_value(
PrefModelAssociator::MergePreference(pref->name(),
*pref->GetValue(),
@@ -102,7 +101,7 @@ TEST_F(ListPreferenceMergeTest, ServerNull) {
{
ListPrefUpdate update(pref_service_, prefs::kURLsToRestoreOnStartup);
base::ListValue* local_list_value = update.Get();
- local_list_value->Append(base::Value::CreateStringValue(local_url0_));
+ local_list_value->Append(new base::StringValue(local_url0_));
}
const PrefService::Preference* pref =
@@ -121,7 +120,7 @@ TEST_F(ListPreferenceMergeTest, ServerEmpty) {
{
ListPrefUpdate update(pref_service_, prefs::kURLsToRestoreOnStartup);
base::ListValue* local_list_value = update.Get();
- local_list_value->Append(base::Value::CreateStringValue(local_url0_));
+ local_list_value->Append(new base::StringValue(local_url0_));
}
const PrefService::Preference* pref =
@@ -139,8 +138,8 @@ TEST_F(ListPreferenceMergeTest, Merge) {
{
ListPrefUpdate update(pref_service_, prefs::kURLsToRestoreOnStartup);
base::ListValue* local_list_value = update.Get();
- local_list_value->Append(base::Value::CreateStringValue(local_url0_));
- local_list_value->Append(base::Value::CreateStringValue(local_url1_));
+ local_list_value->Append(new base::StringValue(local_url0_));
+ local_list_value->Append(new base::StringValue(local_url1_));
}
const PrefService::Preference* pref =
@@ -151,10 +150,10 @@ TEST_F(ListPreferenceMergeTest, Merge) {
server_url_list_));
base::ListValue expected;
- expected.Append(base::Value::CreateStringValue(server_url0_));
- expected.Append(base::Value::CreateStringValue(server_url1_));
- expected.Append(base::Value::CreateStringValue(local_url0_));
- expected.Append(base::Value::CreateStringValue(local_url1_));
+ expected.Append(new base::StringValue(server_url0_));
+ expected.Append(new base::StringValue(server_url1_));
+ expected.Append(new base::StringValue(local_url0_));
+ expected.Append(new base::StringValue(local_url1_));
EXPECT_TRUE(merged_value->Equals(&expected));
}
@@ -162,9 +161,9 @@ TEST_F(ListPreferenceMergeTest, Duplicates) {
{
ListPrefUpdate update(pref_service_, prefs::kURLsToRestoreOnStartup);
base::ListValue* local_list_value = update.Get();
- local_list_value->Append(base::Value::CreateStringValue(local_url0_));
- local_list_value->Append(base::Value::CreateStringValue(server_url0_));
- local_list_value->Append(base::Value::CreateStringValue(server_url1_));
+ local_list_value->Append(new base::StringValue(local_url0_));
+ local_list_value->Append(new base::StringValue(server_url0_));
+ local_list_value->Append(new base::StringValue(server_url1_));
}
const PrefService::Preference* pref =
@@ -175,9 +174,9 @@ TEST_F(ListPreferenceMergeTest, Duplicates) {
server_url_list_));
base::ListValue expected;
- expected.Append(base::Value::CreateStringValue(server_url0_));
- expected.Append(base::Value::CreateStringValue(server_url1_));
- expected.Append(base::Value::CreateStringValue(local_url0_));
+ expected.Append(new base::StringValue(server_url0_));
+ expected.Append(new base::StringValue(server_url1_));
+ expected.Append(new base::StringValue(local_url0_));
EXPECT_TRUE(merged_value->Equals(&expected));
}
@@ -185,8 +184,8 @@ TEST_F(ListPreferenceMergeTest, Equals) {
{
ListPrefUpdate update(pref_service_, prefs::kURLsToRestoreOnStartup);
base::ListValue* local_list_value = update.Get();
- local_list_value->Append(base::Value::CreateStringValue(server_url0_));
- local_list_value->Append(base::Value::CreateStringValue(server_url1_));
+ local_list_value->Append(new base::StringValue(server_url0_));
+ local_list_value->Append(new base::StringValue(server_url1_));
}
scoped_ptr<base::Value> original(server_url_list_.DeepCopy());
@@ -369,7 +368,7 @@ class IndividualPreferenceMergeTest : public AbstractPreferenceMergeTest {
virtual void SetUp() {
AbstractPreferenceMergeTest::SetUp();
- server_url_list_.Append(base::Value::CreateStringValue(url0_));
+ server_url_list_.Append(new base::StringValue(url0_));
SetContentPattern(&server_patterns_, expression0_, content_type0_, 1);
}
@@ -377,7 +376,7 @@ class IndividualPreferenceMergeTest : public AbstractPreferenceMergeTest {
{
ListPrefUpdate update(pref_service_, pref);
base::ListValue* local_list_value = update.Get();
- local_list_value->Append(base::Value::CreateStringValue(url1_));
+ local_list_value->Append(new base::StringValue(url1_));
}
scoped_ptr<base::Value> merged_value(PrefModelAssociator::MergePreference(
@@ -386,8 +385,8 @@ class IndividualPreferenceMergeTest : public AbstractPreferenceMergeTest {
server_url_list_));
base::ListValue expected;
- expected.Append(base::Value::CreateStringValue(url0_));
- expected.Append(base::Value::CreateStringValue(url1_));
+ expected.Append(new base::StringValue(url0_));
+ expected.Append(new base::StringValue(url1_));
return merged_value->Equals(&expected);
}
« no previous file with comments | « chrome/browser/prefs/pref_hash_filter_unittest.cc ('k') | chrome/browser/prefs/proxy_policy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698