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

Unified Diff: components/json_schema/json_schema_validator_unittest_base.cc

Issue 1129083003: More base::Values-related bare pointer -> scoped_ptr conversions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad merge Created 5 years, 7 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 | « components/history/core/browser/top_sites_impl.cc ('k') | components/policy/core/common/mac_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/json_schema/json_schema_validator_unittest_base.cc
diff --git a/components/json_schema/json_schema_validator_unittest_base.cc b/components/json_schema/json_schema_validator_unittest_base.cc
index 6a5f853791c5fa2a1296f8d211169d888502929a..38f111c66264156a4583523337eef8971e7180c3 100644
--- a/components/json_schema/json_schema_validator_unittest_base.cc
+++ b/components/json_schema/json_schema_validator_unittest_base.cc
@@ -154,11 +154,8 @@ void JSONSchemaValidatorTestBase::TestEnum() {
NULL,
std::string(),
JSONSchemaValidator::kInvalidEnum);
- ExpectNotValid(TEST_SOURCE,
- scoped_ptr<base::Value>(base::Value::CreateNullValue()).get(),
- schema.get(),
- NULL,
- std::string(),
+ ExpectNotValid(TEST_SOURCE, base::Value::CreateNullValue().get(),
+ schema.get(), NULL, std::string(),
JSONSchemaValidator::kInvalidEnum);
}
@@ -166,9 +163,8 @@ void JSONSchemaValidatorTestBase::TestChoices() {
scoped_ptr<base::DictionaryValue> schema(
LoadDictionary("choices_schema.json"));
- ExpectValid(TEST_SOURCE,
- scoped_ptr<base::Value>(base::Value::CreateNullValue()).get(),
- schema.get(), NULL);
+ ExpectValid(TEST_SOURCE, base::Value::CreateNullValue().get(), schema.get(),
+ NULL);
ExpectValid(TEST_SOURCE,
scoped_ptr<base::Value>(new base::FundamentalValue(42)).get(),
schema.get(), NULL);
@@ -620,7 +616,7 @@ void JSONSchemaValidatorTestBase::TestTypeClassifier() {
scoped_ptr<base::Value>(new base::DictionaryValue()).get()));
EXPECT_EQ(std::string(schema::kNull),
JSONSchemaValidator::GetJSONSchemaType(
- scoped_ptr<base::Value>(base::Value::CreateNullValue()).get()));
+ base::Value::CreateNullValue().get()));
}
void JSONSchemaValidatorTestBase::TestTypes() {
@@ -683,9 +679,8 @@ void JSONSchemaValidatorTestBase::TestTypes() {
schema.get(), NULL);
schema->SetString(schema::kType, schema::kNull);
- ExpectValid(TEST_SOURCE,
- scoped_ptr<base::Value>(base::Value::CreateNullValue()).get(),
- schema.get(), NULL);
+ ExpectValid(TEST_SOURCE, base::Value::CreateNullValue().get(), schema.get(),
+ NULL);
// not valid
schema->SetString(schema::kType, schema::kObject);
@@ -700,13 +695,10 @@ void JSONSchemaValidatorTestBase::TestTypes() {
schema->SetString(schema::kType, schema::kObject);
ExpectNotValid(
- TEST_SOURCE,
- scoped_ptr<base::Value>(base::Value::CreateNullValue()).get(),
- schema.get(),
- NULL,
+ TEST_SOURCE, base::Value::CreateNullValue().get(), schema.get(), NULL,
std::string(),
- JSONSchemaValidator::FormatErrorMessage(
- JSONSchemaValidator::kInvalidType, schema::kObject, schema::kNull));
+ JSONSchemaValidator::FormatErrorMessage(JSONSchemaValidator::kInvalidType,
+ schema::kObject, schema::kNull));
schema->SetString(schema::kType, schema::kArray);
ExpectNotValid(
« no previous file with comments | « components/history/core/browser/top_sites_impl.cc ('k') | components/policy/core/common/mac_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698