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

Unified Diff: extensions/browser/value_store/value_store_change_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
Index: extensions/browser/value_store/value_store_change_unittest.cc
diff --git a/extensions/browser/value_store/value_store_change_unittest.cc b/extensions/browser/value_store/value_store_change_unittest.cc
index 5fb75b7261f2bd464df1a79aaab7df2cd1b532d5..9da1f64782b27984decf556e448087c77e31d99e 100644
--- a/extensions/browser/value_store/value_store_change_unittest.cc
+++ b/extensions/browser/value_store/value_store_change_unittest.cc
@@ -18,22 +18,22 @@ using extensions::ListBuilder;
namespace {
TEST(ValueStoreChangeTest, NullOldValue) {
- ValueStoreChange change("key", NULL, base::Value::CreateStringValue("value"));
+ ValueStoreChange change("key", NULL, new base::StringValue("value"));
EXPECT_EQ("key", change.key());
EXPECT_EQ(NULL, change.old_value());
{
- scoped_ptr<base::Value> expected(base::Value::CreateStringValue("value"));
+ scoped_ptr<base::Value> expected(new base::StringValue("value"));
EXPECT_TRUE(change.new_value()->Equals(expected.get()));
}
}
TEST(ValueStoreChangeTest, NullNewValue) {
- ValueStoreChange change("key", base::Value::CreateStringValue("value"), NULL);
+ ValueStoreChange change("key", new base::StringValue("value"), NULL);
EXPECT_EQ("key", change.key());
{
- scoped_ptr<base::Value> expected(base::Value::CreateStringValue("value"));
+ scoped_ptr<base::Value> expected(new base::StringValue("value"));
EXPECT_TRUE(change.old_value()->Equals(expected.get()));
}
EXPECT_EQ(NULL, change.new_value());
@@ -41,18 +41,16 @@ TEST(ValueStoreChangeTest, NullNewValue) {
TEST(ValueStoreChangeTest, NonNullValues) {
ValueStoreChange change("key",
- base::Value::CreateStringValue("old_value"),
- base::Value::CreateStringValue("new_value"));
+ new base::StringValue("old_value"),
+ new base::StringValue("new_value"));
EXPECT_EQ("key", change.key());
{
- scoped_ptr<base::Value> expected(
- base::Value::CreateStringValue("old_value"));
+ scoped_ptr<base::Value> expected(new base::StringValue("old_value"));
EXPECT_TRUE(change.old_value()->Equals(expected.get()));
}
{
- scoped_ptr<base::Value> expected(
- base::Value::CreateStringValue("new_value"));
+ scoped_ptr<base::Value> expected(new base::StringValue("new_value"));
EXPECT_TRUE(change.new_value()->Equals(expected.get()));
}
}

Powered by Google App Engine
This is Rietveld 408576698