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

Unified Diff: tools/json_schema_compiler/test/simple_api_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
« no previous file with comments | « tools/json_schema_compiler/test/objects_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 0cf3fb8f4a766125329ddcca2726234ea5489b9d..f32031bd0c3e19ca6be4a10c6a5296915863f79d 100644
--- a/tools/json_schema_compiler/test/simple_api_unittest.cc
+++ b/tools/json_schema_compiler/test/simple_api_unittest.cc
@@ -15,8 +15,7 @@ static scoped_ptr<base::DictionaryValue> CreateTestTypeDictionary() {
value->SetWithoutPathExpansion("number",
base::Value::CreateDoubleValue(1.1));
value->SetWithoutPathExpansion("integer", new base::FundamentalValue(4));
- value->SetWithoutPathExpansion("string",
- base::Value::CreateStringValue("bling"));
+ value->SetWithoutPathExpansion("string", new base::StringValue("bling"));
value->SetWithoutPathExpansion("boolean", new base::FundamentalValue(true));
return value.Pass();
}
@@ -42,8 +41,8 @@ TEST(JsonSchemaCompilerSimpleTest, IncrementIntegerParamsCreate) {
TEST(JsonSchemaCompilerSimpleTest, NumberOfParams) {
{
scoped_ptr<base::ListValue> params_value(new base::ListValue());
- params_value->Append(base::Value::CreateStringValue("text"));
- params_value->Append(base::Value::CreateStringValue("text"));
+ params_value->Append(new base::StringValue("text"));
+ params_value->Append(new base::StringValue("text"));
scoped_ptr<OptionalString::Params> params(
OptionalString::Params::Create(*params_value));
EXPECT_FALSE(params.get());
@@ -66,7 +65,7 @@ TEST(JsonSchemaCompilerSimpleTest, OptionalStringParamsCreate) {
}
{
scoped_ptr<base::ListValue> params_value(new base::ListValue());
- params_value->Append(base::Value::CreateStringValue("asdf"));
+ params_value->Append(new base::StringValue("asdf"));
scoped_ptr<OptionalString::Params> params(
OptionalString::Params::Create(*params_value));
EXPECT_TRUE(params.get());
@@ -100,7 +99,7 @@ TEST(JsonSchemaCompilerSimpleTest, OptionalBeforeRequired) {
{
scoped_ptr<base::ListValue> params_value(new base::ListValue());
params_value->Append(base::Value::CreateNullValue());
- params_value->Append(base::Value::CreateStringValue("asdf"));
+ params_value->Append(new base::StringValue("asdf"));
scoped_ptr<OptionalBeforeRequired::Params> params(
OptionalBeforeRequired::Params::Create(*params_value));
EXPECT_TRUE(params.get());
@@ -161,7 +160,7 @@ TEST(JsonSchemaCompilerSimpleTest, OnStringFiredCreate) {
{
scoped_ptr<base::ListValue> results(OnStringFired::Create("yo dawg"));
base::ListValue expected;
- expected.Append(base::Value::CreateStringValue("yo dawg"));
+ expected.Append(new base::StringValue("yo dawg"));
EXPECT_TRUE(results->Equals(&expected));
}
}
« no previous file with comments | « tools/json_schema_compiler/test/objects_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698