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

Unified Diff: tools/json_schema_compiler/test/simple_api_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 | « tools/json_schema_compiler/test/error_generation_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json_schema_compiler/test/simple_api_unittest.cc
diff --git a/tools/json_schema_compiler/test/simple_api_unittest.cc b/tools/json_schema_compiler/test/simple_api_unittest.cc
index 29d76373c8a18e15fbe17a8167e5f9be9019bfb9..54c773f2174c51f8a780ec1e4668796d49f86c72 100644
--- a/tools/json_schema_compiler/test/simple_api_unittest.cc
+++ b/tools/json_schema_compiler/test/simple_api_unittest.cc
@@ -4,6 +4,7 @@
#include "tools/json_schema_compiler/test/simple_api.h"
+#include "base/memory/ptr_util.h"
#include "testing/gtest/include/gtest/gtest.h"
using namespace test::api::simple_api;
@@ -77,7 +78,7 @@ TEST(JsonSchemaCompilerSimpleTest, OptionalStringParamsCreate) {
TEST(JsonSchemaCompilerSimpleTest, OptionalParamsTakingNull) {
{
std::unique_ptr<base::ListValue> params_value(new base::ListValue());
- params_value->Append(base::Value::CreateNullValue());
+ params_value->Append(base::MakeUnique<base::Value>());
std::unique_ptr<OptionalString::Params> params(
OptionalString::Params::Create(*params_value));
EXPECT_TRUE(params.get());
@@ -98,7 +99,7 @@ TEST(JsonSchemaCompilerSimpleTest, OptionalStringParamsWrongType) {
TEST(JsonSchemaCompilerSimpleTest, OptionalBeforeRequired) {
{
std::unique_ptr<base::ListValue> params_value(new base::ListValue());
- params_value->Append(base::Value::CreateNullValue());
+ params_value->Append(base::MakeUnique<base::Value>());
params_value->AppendString("asdf");
std::unique_ptr<OptionalBeforeRequired::Params> params(
OptionalBeforeRequired::Params::Create(*params_value));
« no previous file with comments | « tools/json_schema_compiler/test/error_generation_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698