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

Side by Side Diff: tools/json_schema_compiler/test/additional_properties_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "tools/json_schema_compiler/test/additional_properties.h" 6 #include "tools/json_schema_compiler/test/additional_properties.h"
7 7
8 using namespace test::api::additional_properties; 8 using namespace test::api::additional_properties;
9 9
10 TEST(JsonSchemaCompilerAdditionalPropertiesTest, 10 TEST(JsonSchemaCompilerAdditionalPropertiesTest,
11 AdditionalPropertiesTypePopulate) { 11 AdditionalPropertiesTypePopulate) {
12 { 12 {
13 scoped_ptr<base::ListValue> list_value(new base::ListValue()); 13 scoped_ptr<base::ListValue> list_value(new base::ListValue());
14 list_value->Append(base::Value::CreateStringValue("asdf")); 14 list_value->Append(new base::StringValue("asdf"));
15 list_value->Append(new base::FundamentalValue(4)); 15 list_value->Append(new base::FundamentalValue(4));
16 scoped_ptr<base::DictionaryValue> type_value(new base::DictionaryValue()); 16 scoped_ptr<base::DictionaryValue> type_value(new base::DictionaryValue());
17 type_value->SetString("string", "value"); 17 type_value->SetString("string", "value");
18 type_value->SetInteger("other", 9); 18 type_value->SetInteger("other", 9);
19 type_value->Set("another", list_value.release()); 19 type_value->Set("another", list_value.release());
20 scoped_ptr<AdditionalPropertiesType> type(new AdditionalPropertiesType()); 20 scoped_ptr<AdditionalPropertiesType> type(new AdditionalPropertiesType());
21 ASSERT_TRUE(AdditionalPropertiesType::Populate(*type_value, type.get())); 21 ASSERT_TRUE(AdditionalPropertiesType::Populate(*type_value, type.get()));
22 EXPECT_TRUE(type->additional_properties.Equals(type_value.get())); 22 EXPECT_TRUE(type->additional_properties.Equals(type_value.get()));
23 } 23 }
24 { 24 {
(...skipping 30 matching lines...) Expand all
55 base::DictionaryValue* dict = new base::DictionaryValue(); 55 base::DictionaryValue* dict = new base::DictionaryValue();
56 dict->SetInteger("integer", 5); 56 dict->SetInteger("integer", 5);
57 dict->SetString("key", "value"); 57 dict->SetString("key", "value");
58 expected.Append(dict); 58 expected.Append(dict);
59 } 59 }
60 60
61 EXPECT_TRUE(base::Value::Equals( 61 EXPECT_TRUE(base::Value::Equals(
62 ReturnAdditionalProperties::Results::Create(result_object).get(), 62 ReturnAdditionalProperties::Results::Create(result_object).get(),
63 &expected)); 63 &expected));
64 } 64 }
OLDNEW
« no previous file with comments | « extensions/renderer/dom_activity_logger.cc ('k') | tools/json_schema_compiler/test/any_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698