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

Unified Diff: tools/json_schema_compiler/test/enums.json

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/enums.json
diff --git a/tools/json_schema_compiler/test/enums.json b/tools/json_schema_compiler/test/enums.json
index 51e1fd41108493e80d19187c0d562a9b5dfc1109..ae6be004d84a5facc09f945ce79bad0acb5459d0 100644
--- a/tools/json_schema_compiler/test/enums.json
+++ b/tools/json_schema_compiler/test/enums.json
@@ -43,6 +43,47 @@
]
},
{
+ "name": "returnsEnum",
+ "type": "function",
+ "description": "Returns an enum through the callback",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "state",
+ "type": "string",
+ "enum": ["foo", "bar", "baz"]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "returnsTwoEnums",
+ "type": "function",
+ "description": "Returns two enums through the callback",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "firstState",
+ "type": "string",
+ "enum": ["foo", "bar", "baz"]
+ },
+ {
+ "name": "secondState",
+ "type": "string",
+ "enum": ["spam", "ham", "eggs"]
+ }
+ ]
+ }
+ ]
+ },
+ {
"name": "takesOptionalEnum",
"type": "function",
"description": "Takes an enum as its parameter.",
@@ -84,6 +125,37 @@
}
]
}
+ ],
+ "events": [
+ {
+ "name": "onEnumFired",
+ "type": "function",
+ "description": "Fired when an enum is ready.",
+ "parameters": [
+ {
+ "name": "someEnum",
+ "type": "string",
+ "enum": ["foo", "bar", "baz"]
+ }
+ ]
+ },
+ {
+ "name": "onTwoEnumsFired",
+ "type": "function",
+ "description": "Fired when two enums are ready.",
+ "parameters": [
+ {
+ "name": "firstEnum",
+ "type": "string",
+ "enum": ["foo", "bar", "baz"]
+ },
+ {
+ "name": "secondEnum",
+ "type": "string",
+ "enum": ["spam", "ham", "eggs"]
+ }
+ ]
+ }
]
}
]
« no previous file with comments | « tools/json_schema_compiler/test/crossref_unittest.cc ('k') | tools/json_schema_compiler/test/enums_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698