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

Unified Diff: mojo/common/common_custom_types_unittest.cc

Issue 2792573002: Remove base::Value::CreateNullValue (Closed)
Patch Set: Rebase Created 3 years, 8 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 | « media/base/video_frame_unittest.cc ('k') | mojo/common/values_struct_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/common/common_custom_types_unittest.cc
diff --git a/mojo/common/common_custom_types_unittest.cc b/mojo/common/common_custom_types_unittest.cc
index e3571d9d86cf65e54718868e089bf976101d4929..36fc0423ddfcc7016907ff4fe2c3e17ef0aa1866 100644
--- a/mojo/common/common_custom_types_unittest.cc
+++ b/mojo/common/common_custom_types_unittest.cc
@@ -274,7 +274,7 @@ TEST_F(CommonCustomTypesTest, Value) {
ASSERT_TRUE(ptr->BounceValue(nullptr, &output));
EXPECT_FALSE(output);
- std::unique_ptr<base::Value> input = base::Value::CreateNullValue();
+ auto input = base::MakeUnique<base::Value>();
ASSERT_TRUE(ptr->BounceValue(input->CreateDeepCopy(), &output));
EXPECT_TRUE(base::Value::Equals(input.get(), output.get()));
@@ -306,7 +306,7 @@ TEST_F(CommonCustomTypesTest, Value) {
dict->SetInteger("nested.int", 9);
dict->Set("some_binary",
base::BinaryValue::CreateWithCopiedBuffer("mojo", 4));
- dict->Set("null_value", base::Value::CreateNullValue());
+ dict->Set("null_value", base::MakeUnique<base::Value>());
dict->SetIntegerWithoutPathExpansion("non_nested.int", 10);
{
std::unique_ptr<base::ListValue> dict_list(new base::ListValue());
@@ -328,7 +328,7 @@ TEST_F(CommonCustomTypesTest, Value) {
list->AppendDouble(42.1);
list->AppendBoolean(true);
list->Append(base::BinaryValue::CreateWithCopiedBuffer("mojo", 4));
- list->Append(base::Value::CreateNullValue());
+ list->Append(base::MakeUnique<base::Value>());
{
std::unique_ptr<base::DictionaryValue> list_dict(
new base::DictionaryValue());
« no previous file with comments | « media/base/video_frame_unittest.cc ('k') | mojo/common/values_struct_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698