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

Unified Diff: tools/json_schema_compiler/test/functions_on_types_unittest.cc

Issue 10701012: JSON Schema Compiler: Added event compilation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Tested GetAllPossibleParameterLists better. Created 8 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
Index: tools/json_schema_compiler/test/functions_on_types_unittest.cc
diff --git a/tools/json_schema_compiler/test/functions_on_types_unittest.cc b/tools/json_schema_compiler/test/functions_on_types_unittest.cc
index 0694cb348de6e75405f25051ab6879121cd64742..d88c3fb40a036c9dbef13a833a1c8c561d9b29a3 100644
--- a/tools/json_schema_compiler/test/functions_on_types_unittest.cc
+++ b/tools/json_schema_compiler/test/functions_on_types_unittest.cc
@@ -48,12 +48,13 @@ TEST(JsonSchemaCompilerFunctionsOnTypesTest, StorageAreaGetParamsCreate) {
}
TEST(JsonSchemaCompilerFunctionsOnTypesTest, StorageAreaGetResultCreate) {
- scoped_ptr<StorageArea::Get::Result::Items> items(
- new StorageArea::Get::Result::Items());
- items->additional_properties.SetDouble("asdf", 0.1);
- items->additional_properties.SetString("sdfg", "zxcv");
- scoped_ptr<Value> result_value(StorageArea::Get::Result::Create(*items));
- EXPECT_TRUE(result_value->Equals(&items->additional_properties));
+ StorageArea::Get::Result::Items items;
+ items.additional_properties.SetDouble("asdf", 0.1);
+ items.additional_properties.SetString("sdfg", "zxcv");
+ scoped_ptr<ListValue> results(StorageArea::Get::Result::Create(items));
+ DictionaryValue* item_result = NULL;
+ results->GetDictionary(0, &item_result);
+ EXPECT_TRUE(item_result->Equals(&items.additional_properties));
}
TEST(JsonSchemaCompilerFunctionsOnTypesTest, ChromeSettingGetParamsCreate) {

Powered by Google App Engine
This is Rietveld 408576698