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

Side by Side Diff: tools/json_schema_compiler/test/objects.json

Issue 1055673002: [Extensions API] Remove inline enums (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years, 8 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": "objects", 3 "namespace": "objects",
4 "description": "The objects API.", 4 "description": "The objects API.",
5 "types": [], 5 "types": [
6 {
7 "id": "firstState",
8 "type": "string",
9 "enum": ["foo", "bar", "baz"]
10 },
11 {
12 "id": "secondState",
13 "type": "string",
14 "enum": ["spam", "ham", "eggs"]
15 }
16 ],
6 "functions": [ 17 "functions": [
7 { 18 {
8 "name": "objectParam", 19 "name": "objectParam",
9 "type": "function", 20 "type": "function",
10 "description": "Takes an object.", 21 "description": "Takes an object.",
11 "parameters": [ 22 "parameters": [
12 { 23 {
13 "name": "info", 24 "name": "info",
14 "type": "object", 25 "type": "object",
15 "properties": { 26 "properties": {
(...skipping 23 matching lines...) Expand all
39 "parameters": [ 50 "parameters": [
40 { 51 {
41 "name": "callback", 52 "name": "callback",
42 "type": "function", 53 "type": "function",
43 "parameters": [ 54 "parameters": [
44 { 55 {
45 "name": "info", 56 "name": "info",
46 "type": "object", 57 "type": "object",
47 "properties": { 58 "properties": {
48 "state": { 59 "state": {
49 "type": "string", 60 "$ref": "firstState"
50 "enum": ["foo", "bar", "baz"]
51 } 61 }
52 } 62 }
53 } 63 }
54 ] 64 ]
55 } 65 }
56 ] 66 ]
57 }, 67 },
58 { 68 {
59 "name": "returnsTwoObjects", 69 "name": "returnsTwoObjects",
60 "description": "Return two objects.", 70 "description": "Return two objects.",
61 "type": "function", 71 "type": "function",
62 "parameters": [ 72 "parameters": [
63 { 73 {
64 "name": "callback", 74 "name": "callback",
65 "type": "function", 75 "type": "function",
66 "parameters": [ 76 "parameters": [
67 { 77 {
68 "name": "firstInfo", 78 "name": "firstInfo",
69 "type": "object", 79 "type": "object",
70 "properties": { 80 "properties": {
71 "state": { 81 "state": {
72 "type": "string", 82 "$ref": "firstState"
73 "enum": ["foo", "bar", "baz"]
74 } 83 }
75 } 84 }
76 }, 85 },
77 { 86 {
78 "name": "secondInfo", 87 "name": "secondInfo",
79 "type": "object", 88 "type": "object",
80 "properties": { 89 "properties": {
81 "state": { 90 "state": {
82 "type": "string", 91 "$ref": "secondState"
83 "enum": ["spam", "ham", "eggs"]
84 } 92 }
85 } 93 }
86 } 94 }
87 ] 95 ]
88 } 96 }
89 ] 97 ]
90 } 98 }
91 ], 99 ],
92 "events": [ 100 "events": [
93 { 101 {
94 "name": "onObjectFired", 102 "name": "onObjectFired",
95 "type": "function", 103 "type": "function",
96 "description": "Fired when an object is ready.", 104 "description": "Fired when an object is ready.",
97 "parameters": [ 105 "parameters": [
98 { 106 {
99 "name": "someObject", 107 "name": "someObject",
100 "type": "object", 108 "type": "object",
101 "properties": { 109 "properties": {
102 "state": { 110 "state": {
103 "type": "string", 111 "$ref": "firstState"
104 "enum": ["foo", "bar", "baz"]
105 } 112 }
106 } 113 }
107 } 114 }
108 ] 115 ]
109 }, 116 },
110 { 117 {
111 "name": "onTwoObjectsFired", 118 "name": "onTwoObjectsFired",
112 "type": "function", 119 "type": "function",
113 "description": "Fired when two objects are ready.", 120 "description": "Fired when two objects are ready.",
114 "parameters": [ 121 "parameters": [
115 { 122 {
116 "name": "firstObject", 123 "name": "firstObject",
117 "type": "object", 124 "type": "object",
118 "properties": { 125 "properties": {
119 "state": { 126 "state": {
120 "type": "string", 127 "$ref": "firstState"
121 "enum": ["foo", "bar", "baz"]
122 } 128 }
123 } 129 }
124 }, 130 },
125 { 131 {
126 "name": "secondObject", 132 "name": "secondObject",
127 "type": "object", 133 "type": "object",
128 "properties": { 134 "properties": {
129 "state": { 135 "state": {
130 "type": "string", 136 "$ref": "secondState"
131 "enum": ["spam", "ham", "eggs"]
132 } 137 }
133 } 138 }
134 } 139 }
135 ] 140 ]
136 } 141 }
137 ] 142 ]
138 } 143 }
139 ] 144 ]
140 145
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/test/enums_unittest.cc ('k') | tools/json_schema_compiler/test/objects_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698