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

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

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/objects.json
diff --git a/tools/json_schema_compiler/test/objects.json b/tools/json_schema_compiler/test/objects.json
index 8fb20b408343726956dad03917c47b6b610ac730..00a7f5320269f75ebb00cf03b6edff52fa13f992 100644
--- a/tools/json_schema_compiler/test/objects.json
+++ b/tools/json_schema_compiler/test/objects.json
@@ -53,6 +53,85 @@
]
}
]
+ },
+ {
+ "name": "returnsTwoObjects",
+ "description": "Return two objects.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "firstInfo",
+ "type": "object",
+ "properties": {
+ "state": {
+ "type": "string",
+ "enum": ["foo", "bar", "baz"]
+ }
+ }
+ },
+ {
+ "name": "secondInfo",
+ "type": "object",
+ "properties": {
+ "state": {
+ "type": "string",
+ "enum": ["spam", "ham", "eggs"]
+ }
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ],
+ "events": [
+ {
+ "name": "onObjectFired",
+ "type": "function",
+ "description": "Fired when an object is ready.",
+ "parameters": [
+ {
+ "name": "someObject",
+ "type": "object",
+ "properties": {
+ "state": {
+ "type": "string",
+ "enum": ["foo", "bar", "baz"]
+ }
+ }
+ }
+ ]
+ },
+ {
+ "name": "onTwoObjectsFired",
+ "type": "function",
+ "description": "Fired when two objects are ready.",
+ "parameters": [
+ {
+ "name": "firstObject",
+ "type": "object",
+ "properties": {
+ "state": {
+ "type": "string",
+ "enum": ["foo", "bar", "baz"]
+ }
+ }
+ },
+ {
+ "name": "secondObject",
+ "type": "object",
+ "properties": {
+ "state": {
+ "type": "string",
+ "enum": ["spam", "ham", "eggs"]
+ }
+ }
+ }
+ ]
}
]
}

Powered by Google App Engine
This is Rietveld 408576698