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

Side by Side 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: Added more testing for event compilation. 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 unified diff | Download patch
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "enums", 3 "namespace": "enums",
4 "types": [ 4 "types": [
5 { 5 {
6 "id": "EnumType", 6 "id": "EnumType",
7 "type": "object", 7 "type": "object",
8 "properties": { 8 "properties": {
9 "type": { 9 "type": {
10 "type": "string", 10 "type": "string",
(...skipping 25 matching lines...) Expand all
36 "enum": ["foo", "bar", "baz"] 36 "enum": ["foo", "bar", "baz"]
37 }, 37 },
38 { 38 {
39 "name": "callback", 39 "name": "callback",
40 "type": "function", 40 "type": "function",
41 "parameters": [] 41 "parameters": []
42 } 42 }
43 ] 43 ]
44 }, 44 },
45 { 45 {
46 "name": "returnsEnum",
47 "type": "function",
48 "description": "Takes an enum as its parameter.",
49 "parameters": [
50 {
51 "name": "callback",
52 "type": "function",
53 "parameters": [
54 {
55 "name": "state",
56 "type": "string",
57 "enum": ["foo", "bar", "baz"]
58 }
59 ]
60 }
61 ]
62 },
63 {
46 "name": "takesOptionalEnum", 64 "name": "takesOptionalEnum",
47 "type": "function", 65 "type": "function",
48 "description": "Takes an enum as its parameter.", 66 "description": "Takes an enum as its parameter.",
49 "parameters": [ 67 "parameters": [
50 { 68 {
51 "name": "state", 69 "name": "state",
52 "type": "string", 70 "type": "string",
53 "enum": ["foo", "bar", "baz"], 71 "enum": ["foo", "bar", "baz"],
54 "optional": true 72 "optional": true
55 }, 73 },
(...skipping 21 matching lines...) Expand all
77 "enum": ["foo", "ding", "dong"], 95 "enum": ["foo", "ding", "dong"],
78 "optional": true 96 "optional": true
79 }, 97 },
80 { 98 {
81 "name": "callback", 99 "name": "callback",
82 "type": "function", 100 "type": "function",
83 "parameters": [] 101 "parameters": []
84 } 102 }
85 ] 103 ]
86 } 104 }
105 ],
106 "events": [
107 {
108 "name": "onEnumFired",
109 "type": "function",
110 "description": "Fired when an enum is ready.",
111 "parameters": [
112 {
113 "name": "someEnum",
114 "type": "string",
115 "enum": ["foo", "bar", "baz"]
116 }
117 ]
118 }
87 ] 119 ]
88 } 120 }
89 ] 121 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698