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

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: Synced. 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..73a3cf20cb17f1d7906cfbaf0bfb14012b0039ed 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::Results::Items items;
+ items.additional_properties.SetDouble("asdf", 0.1);
+ items.additional_properties.SetString("sdfg", "zxcv");
+ scoped_ptr<ListValue> results = StorageArea::Get::Results::Create(items);
+ DictionaryValue* item_result = NULL;
+ results->GetDictionary(0, &item_result);
+ EXPECT_TRUE(item_result->Equals(&items.additional_properties));
}
TEST(JsonSchemaCompilerFunctionsOnTypesTest, ChromeSettingGetParamsCreate) {
« no previous file with comments | « tools/json_schema_compiler/test/forbidden.json ('k') | tools/json_schema_compiler/test/idl_schemas_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698