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: tools/json_schema_compiler/test/error_generation_unittest.cc

Issue 2689673002: Inline base::BinaryValue into base::Value (Closed)
Patch Set: Rebase Created 3 years, 10 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 | « ppapi/shared_impl/private/ppb_x509_certificate_private_shared.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/error_generation_unittest.cc
diff --git a/tools/json_schema_compiler/test/error_generation_unittest.cc b/tools/json_schema_compiler/test/error_generation_unittest.cc
index 5c3f1b800e344aed7e526e0875b03e74a8d8c469..73fcfdcad47c322bd35feaa66e2fb6fbd41ec423 100644
--- a/tools/json_schema_compiler/test/error_generation_unittest.cc
+++ b/tools/json_schema_compiler/test/error_generation_unittest.cc
@@ -5,6 +5,7 @@
#include "tools/json_schema_compiler/test/error_generation.h"
#include "base/json/json_writer.h"
+#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "tools/json_schema_compiler/test/test_util.h"
@@ -39,7 +40,7 @@ TEST(JsonSchemaCompilerErrorTest, RequiredPropertyPopulate) {
EXPECT_TRUE(EqualsUtf16("", GetPopulateError<TestType>(*value)));
}
{
- std::unique_ptr<base::BinaryValue> value(new base::BinaryValue());
+ auto value = base::MakeUnique<base::Value>(base::Value::Type::BINARY);
EXPECT_TRUE(EqualsUtf16("expected dictionary, got binary",
GetPopulateError<TestType>(*value)));
}
@@ -52,7 +53,7 @@ TEST(JsonSchemaCompilerErrorTest, UnexpectedTypePopulation) {
GetPopulateError<ChoiceType::Integers>(*value)));
}
{
- std::unique_ptr<base::BinaryValue> value(new base::BinaryValue());
+ auto value = base::MakeUnique<base::Value>(base::Value::Type::BINARY);
EXPECT_TRUE(EqualsUtf16("expected integers or integer, got binary",
GetPopulateError<ChoiceType::Integers>(*value)));
}
@@ -178,7 +179,7 @@ TEST(JsonSchemaCompilerErrorTest, UnableToPopulateArray) {
TEST(JsonSchemaCompilerErrorTest, BinaryTypeExpected) {
{
std::unique_ptr<base::DictionaryValue> value =
- Dictionary("data", new base::BinaryValue());
+ Dictionary("data", new base::Value(base::Value::Type::BINARY));
EXPECT_TRUE(EqualsUtf16("", GetPopulateError<BinaryData>(*value)));
}
{
@@ -244,7 +245,7 @@ TEST(JsonSchemaCompilerErrorTest, WarnOnOptionalFailure) {
TEST(JsonSchemaCompilerErrorTest, OptionalBinaryTypeFailure) {
{
std::unique_ptr<base::DictionaryValue> value =
- Dictionary("data", new base::BinaryValue());
+ Dictionary("data", new base::Value(base::Value::Type::BINARY));
EXPECT_TRUE(EqualsUtf16("", GetPopulateError<OptionalBinaryData>(*value)));
}
{
« no previous file with comments | « ppapi/shared_impl/private/ppb_x509_certificate_private_shared.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698