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

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

Issue 10701012: JSON Schema Compiler: Added event compilation. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Reworked Create functions and lots of tests. 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/callbacks.json
diff --git a/tools/json_schema_compiler/test/objects.json b/tools/json_schema_compiler/test/callbacks.json
similarity index 53%
copy from tools/json_schema_compiler/test/objects.json
copy to tools/json_schema_compiler/test/callbacks.json
index 8fb20b408343726956dad03917c47b6b610ac730..06455b99e056928f42356317f0fe53b61bfcd253 100644
--- a/tools/json_schema_compiler/test/objects.json
+++ b/tools/json_schema_compiler/test/callbacks.json
@@ -1,30 +1,14 @@
[
{
- "namespace": "objects",
+ "namespace": "callbacks",
"types": [],
"functions": [
{
- "name": "objectParam",
+ "name": "returnsNothing",
"type": "function",
- "description": "Takes an object.",
+ "description": "Takes nothing. Returns nothing.",
"parameters": [
{
- "name": "info",
- "type": "object",
- "properties": {
- "strings": {
- "type": "array",
- "items": {"type": "string"}
- },
- "integer": {
- "type": "integer"
- },
- "boolean": {
- "type": "boolean"
- }
- }
- },
- {
"name": "callback",
"type": "function",
"parameters": []
@@ -41,7 +25,34 @@
"type": "function",
"parameters": [
{
- "name": "info",
+ "name": "someObject",
+ "type": "object",
+ "properties": {
+ "state": {
+ "type": "string",
+ "enum": ["foo", "bar", "baz"]
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "returnsMultiple",
+ "description": "Returns an object.",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "someInteger",
+ "type": "integer"
+ },
+ {
+ "name": "someObject",
"type": "object",
"properties": {
"state": {

Powered by Google App Engine
This is Rietveld 408576698