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

Side by Side Diff: chrome/common/extensions/docs/server2/test_data/canned_data.py

Issue 17397010: Adding AvailabilityFinder to Doc Server (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Second Round of Smaller Fixes Created 7 years, 6 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
(Empty)
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import json
6
7 CANNED_CHANNELS = {
8 'trunk': 'trunk',
9 'dev': 28,
10 'beta': 27,
11 'stable': 26
12 }
13
14 CANNED_BRANCHES = {
15 'trunk': 'trunk',
16 28: 1500,
17 27: 1453,
18 26: 1410,
19 25: 1364,
20 24: 1312,
21 23: 1271,
22 22: 1229,
23 21: 1180,
24 20: 1132,
25 19: 1084,
26 18: 1025,
27 17: 963,
28 16: 912,
29 15: 874,
30 14: 835,
31 13: 782,
32 12: 742,
33 11: 696,
34 10: 648,
35 9: 597,
36 8: 552,
37 7: 544,
38 6: 495,
39 5: 396
40 }
41
42 CANNED_TEST_FILE_SYSTEM_DATA = {
43 'api': {
44 '_manifest_features.json': json.dumps({
45 'manifest': 'features'
46 }),
47 '_permission_features.json': json.dumps({
48 'permission': 'features'
49 })
50 },
51 'docs': {
52 'templates': {
53 'intros': {
54 'test.html': '<h1>hi</h1>you<h2>first</h2><h3>inner</h3><h2>second</h2>'
55 },
56 'json': {
57 'api_availabilities.json': json.dumps({
58 'tester': {
59 'channel': 'stable',
60 'version': 42
61 }
62 }),
63 'intro_tables.json': json.dumps({
64 'tester': {
65 'Permissions': [
66 {
67 'permission': 'tester'
68 },
69 {
70 'extra': 'is an API.'
71 }
72 ],
73 'LearnMore': [
74 {
75 'href': 'https://tester.test.com/welcome.html',
76 'content': 'Welcome!'
77 }
78 ]
79 }
80 })
81 }
82 }
83 }
84 }
85
86 CANNED_API_FILE_SYSTEM_DATA = {
87 'trunk': {
88 'api': {
89 '_api_features.json': json.dumps({
90 'contextMenus': {
91 'channel': 'stable'
92 },
93 'events': {
94 'channel': 'stable'
95 },
96 'extension': {
97 'channel': 'stable'
98 }
99 }),
100 '_manifest_features.json': json.dumps({
101 'history': {
102 'channel': 'beta'
103 },
104 'runtime': {
105 'channel': 'stable'
106 },
107 'storage': {
108 'channel': 'beta'
109 },
110 'sync': {
111 'channel': 'trunk'
112 }
113 }),
114 '_permission_features.json': json.dumps({
115 'alarms': {
116 'channel': 'stable'
117 },
118 'bluetooth': {
119 'channel': 'dev'
120 },
121 'bookmarks': {
122 'channel': 'stable'
123 },
124 'cookies': {
125 'channel': 'dev'
126 },
127 'declarativeContent': {
128 'channel': 'trunk'
129 },
130 'falseBetaAPI': {
131 'channel': 'beta'
132 },
133 'trunkAPI': {
134 'channel': 'trunk'
135 }
136 }),
137 'idle.json': 'idle contents',
138 'input_ime.json': 'input.ime contents',
139 'menus.json': 'menus contents',
140 'tabs.json': 'tabs contents',
141 'windows.json': 'windows contents'
142 },
143 'docs': {
144 'templates': {
145 'json': {
146 'api_availabilities.json': json.dumps({
147 'jsonAPI1': {
148 'channel': 'stable',
149 'version': 10
150 },
151 'jsonAPI2': {
152 'channel': 'trunk'
153 },
154 'jsonAPI3': {
155 'channel': 'dev'
156 }
157 }),
158 'intro_tables.json': json.dumps({
159 'test': [
160 {
161 'Permissions': 'probably none'
162 }
163 ]
164 })
165 }
166 }
167 }
168 },
169 '1500': {
170 'api': {
171 '_api_features.json': json.dumps({
172 'events': {
173 'channel': 'trunk'
174 },
175 'extension': {
176 'channel': 'stable'
177 },
178 'systemInfo.stuff': {
179 'channel': 'dev'
180 }
181 }),
182 '_manifest_features.json': json.dumps({
183 'contextMenus': {
184 'channel': 'trunk'
185 },
186 'notifications': {
187 'channel': 'beta'
188 },
189 'runtime': {
190 'channel': 'stable'
191 },
192 'storage': {
193 'channel': 'dev'
194 },
195 'sync': {
196 'channel': 'trunk'
197 }
198 }),
199 '_permission_features.json': json.dumps({
200 'alarms': {
201 'channel': 'stable'
202 },
203 'bluetooth': {
204 'channel': 'dev'
205 },
206 'bookmarks': {
207 'channel': 'stable'
208 },
209 'cookies': {
210 'channel': 'dev'
211 },
212 'declarativeContent': {
213 'channel': 'trunk'
214 },
215 'downloads': {
216 'channel': 'beta'
217 }
218 }),
219 'idle.json': 'idle contents',
220 'input_ime.json': 'input.ime contents',
221 'menus.json': 'menus contents',
222 'tabs.json': 'tabs contents',
223 'windows.json': 'windows contents'
224 }
225 },
226 '1453': {
227 'api': {
228 '_api_features.json': json.dumps({
229 'events': {
230 'channel': 'dev'
231 },
232 'extension': {
233 'channel': 'stable'
234 },
235 'systemInfo.cpu': {
236 'channel': 'stable'
237 },
238 'systemInfo.stuff': {
239 'channel': 'dev'
240 }
241 }),
242 '_manifest_features.json': json.dumps({
243 'notifications': {
244 'channel': 'dev'
245 },
246 'runtime': {
247 'channel': 'stable'
248 },
249 'storage': {
250 'channel': 'dev'
251 }
252 }),
253 '_permission_features.json': json.dumps({
254 'alarms': {
255 'channel': 'stable'
256 },
257 'bluetooth': {
258 'channel': 'dev'
259 },
260 'bookmarks': {
261 'channel': 'stable'
262 },
263 'context_menus': {
264 'channel': 'trunk'
265 },
266 'declarativeContent': {
267 'channel': 'trunk'
268 },
269 'downloads': {
270 'channel': 'dev'
271 }
272 }),
273 'idle.json': 'idle contents',
274 'input_ime.json': 'input.ime contents',
275 'menus.json': 'menus contents',
276 'tabs.json': 'tabs contents',
277 'windows.json': 'windows contents'
278 }
279 },
280 '1410': {
281 'api': {
282 '_manifest_features.json': json.dumps({
283 'events': {
284 'channel': 'beta'
285 },
286 'notifications': {
287 'channel': 'dev'
288 },
289 'page_action': {
290 'channel': 'stable'
291 },
292 'runtime': {
293 'channel': 'stable'
294 },
295 'web_request': {
296 'channel': 'stable'
297 }
298 }),
299 '_permission_features.json': json.dumps({
300 'alarms': {
301 'channel': 'stable'
302 },
303 'bluetooth': {
304 'channel': 'dev'
305 },
306 'bookmarks': {
307 'channel': 'stable'
308 },
309 'context_menus': {
310 'channel': 'trunk'
311 },
312 'declarativeContent': {
313 'channel': 'trunk'
314 },
315 'systemInfo.display': {
316 'channel': 'stable'
317 }
318 }),
319 'idle.json': 'idle contents',
320 'input_ime.json': 'input.ime contents',
321 'menus.json': 'menus contents',
322 'tabs.json': 'tabs contents',
323 'windows.json': 'windows contents'
324 }
325 },
326 '1364': {
327 'api': {
328 '_manifest_features.json': json.dumps({
329 'page_action': {
330 'channel': 'stable'
331 },
332 'runtime': {
333 'channel': 'stable'
334 }
335 }),
336 '_permission_features.json': json.dumps({
337 'alarms': {
338 'channel': 'stable'
339 },
340 'bookmarks': {
341 'channel': 'stable'
342 },
343 'systemInfo.display': {
344 'channel': 'stable'
345 },
346 'webRequest': {
347 'channel': 'stable'
348 }
349 }),
350 'idle.json': 'idle contents',
351 'input_ime.json': 'input.ime contents',
352 'menus.json': 'menus contents',
353 'tabs.json': 'tabs contents',
354 'windows.json': 'windows contents'
355 }
356 },
357 '1312': {
358 'api': {
359 '_manifest_features.json': json.dumps({
360 'page_action': {
361 'channel': 'stable'
362 },
363 'runtime': {
364 'channel': 'stable'
365 },
366 'web_request': {
367 'channel': 'stable'
368 }
369 }),
370 '_permission_features.json': json.dumps({
371 'alarms': {
372 'channel': 'stable'
373 },
374 'bookmarks': {
375 'channel': 'stable'
376 },
377 'systemInfo.display': {
378 'channel': 'stable'
379 }
380 }),
381 'idle.json': 'idle contents',
382 'input_ime.json': 'input.ime contents',
383 'menus.json': 'menus contents',
384 'tabs.json': 'tabs contents',
385 'windows.json': 'windows contents'
386 }
387 },
388 '1271': {
389 'api': {
390 '_manifest_features.json': json.dumps({
391 'page_action': {
392 'channel': 'stable'
393 },
394 'runtime': {
395 'channel': 'stable'
396 },
397 'system_info_display': {
398 'channel': 'stable'
399 }
400 }),
401 '_permission_features.json': json.dumps({
402 'alarms': {
403 'channel': 'beta'
404 },
405 'bookmarks': {
406 'channel': 'stable'
407 },
408 'webRequest': {
409 'channel': 'stable'
410 }
411 }),
412 'idle.json': 'idle contents',
413 'input_ime.json': 'input.ime contents',
414 'menus.json': 'menus contents',
415 'tabs.json': 'tabs contents',
416 'windows.json': 'windows contents'
417 }
418 },
419 '1229': {
420 'api': {
421 '_manifest_features.json': json.dumps({
422 'page_action': {
423 'channel': 'stable'
424 },
425 'runtime': {
426 'channel': 'stable'
427 },
428 'web_request': {
429 'channel': 'stable'
430 }
431 }),
432 '_permission_features.json': json.dumps({
433 'bookmarks': {
434 'channel': 'stable'
435 },
436 'systemInfo.display': {
437 'channel': 'beta'
438 }
439 }),
440 'idle.json': 'idle contents',
441 'input_ime.json': 'input.ime contents',
442 'menus.json': 'menus contents',
443 'tabs.json': 'tabs contents'
444 }
445 },
446 '1180': {
447 'api': {
448 '_manifest_features.json': json.dumps({
449 'page_action': {
450 'channel': 'stable'
451 },
452 'runtime': {
453 'channel': 'stable'
454 }
455 }),
456 '_permission_features.json': json.dumps({
457 'bookmarks': {
458 'channel': 'stable'
459 },
460 'webRequest': {
461 'channel': 'stable'
462 }
463 }),
464 'idle.json': 'idle contents',
465 'input_ime.json': 'input.ime contents',
466 'menus.json': 'menus contents',
467 'tabs.json': 'tabs contents'
468 }
469 },
470 '1132': {
471 'api': {
472 '_manifest_features.json': json.dumps({
473 'page_action': {
474 'channel': 'stable'
475 }
476 }),
477 '_permission_features.json': json.dumps({
478 'webRequest': {
479 'channel': 'stable'
480 }
481 }),
482 'idle.json': 'idle contents',
483 'input.ime.json': 'input.ime contents',
484 'menus.json': 'menus contents',
485 'tabs.json': 'tabs contents'
486 }
487 },
488 '1084': {
489 'api': {
490 '_manifest_features.json': json.dumps({
491 'contents': 'nothing of interest here,really'
492 }),
493 'idle.json': 'idle contents',
494 'input.ime.json': 'input.ime contents',
495 'menus.json': 'menus contents',
496 'pageAction.json': 'pageAction contents',
497 'tabs.json': 'tabs contents',
498 'webRequest.json': 'webRequest contents'
499 }
500 },
501 '1025': {
502 'api': {
503 'idle.json': 'idle contents',
504 'input.ime.json': 'input.ime contents',
505 'menus.json': 'menus contents',
506 'pageAction.json': 'pageAction contents',
507 'tabs.json': 'tabs contents',
508 'webRequest.json': 'webRequest contents'
509 }
510 },
511 '963': {
512 'api': {
513 'extension_api.json': json.dumps([
514 {
515 'namespace': 'idle'
516 },
517 {
518 'namespace': 'menus'
519 },
520 {
521 'namespace': 'pageAction'
522 },
523 {
524 'namespace': 'webRequest'
525 }
526 ])
527 }
528 },
529 '912': {
530 'api': {
531 'extension_api.json': json.dumps([
532 {
533 'namespace': 'idle'
534 },
535 {
536 'namespace': 'menus'
537 },
538 {
539 'namespace': 'pageAction'
540 },
541 {
542 'namespace': 'experimental.webRequest'
543 }
544 ])
545 }
546 },
547 '874': {
548 'api': {
549 'extension_api.json': json.dumps([
550 {
551 'namespace': 'idle'
552 },
553 {
554 'namespace': 'menus'
555 },
556 {
557 'namespace': 'pageAction'
558 }
559 ])
560 }
561 },
562 '835': {
563 'api': {
564 'extension_api.json': json.dumps([
565 {
566 'namespace': 'idle'
567 },
568 {
569 'namespace': 'menus'
570 },
571 {
572 'namespace': 'pageAction'
573 }
574 ])
575 }
576 },
577 '782': {
578 'api': {
579 'extension_api.json': json.dumps([
580 {
581 'namespace': 'idle'
582 },
583 {
584 'namespace': 'menus'
585 },
586 {
587 'namespace': 'pageAction'
588 }
589 ])
590 }
591 },
592 '742': {
593 'api': {
594 'extension_api.json': json.dumps([
595 {
596 'namespace': 'idle'
597 },
598 {
599 'namespace': 'menus'
600 },
601 {
602 'namespace': 'pageAction'
603 }
604 ])
605 }
606 },
607 '696': {
608 'api': {
609 'extension_api.json': json.dumps([
610 {
611 'namespace': 'idle'
612 },
613 {
614 'namespace': 'menus'
615 },
616 {
617 'namespace': 'pageAction'
618 }
619 ])
620 }
621 },
622 '648': {
623 'api': {
624 'extension_api.json': json.dumps([
625 {
626 'namespace': 'idle'
627 },
628 {
629 'namespace': 'menus'
630 },
631 {
632 'namespace': 'pageAction'
633 }
634 ])
635 }
636 },
637 '597': {
638 'api': {
639 'extension_api.json': json.dumps([
640 {
641 'namespace': 'idle'
642 },
643 {
644 'namespace': 'menus'
645 },
646 {
647 'namespace': 'pageAction'
648 }
649 ])
650 }
651 },
652 '552': {
653 'api': {
654 'extension_api.json': json.dumps([
655 {
656 'namespace': 'idle'
657 },
658 {
659 'namespace': 'menus'
660 },
661 {
662 'namespace': 'pageAction'
663 }
664 ])
665 }
666 },
667 '544': {
668 'api': {
669 'extension_api.json': json.dumps([
670 {
671 'namespace': 'idle'
672 },
673 {
674 'namespace': 'menus'
675 }
676 ])
677 }
678 },
679 '495': {
680 'api': {
681 'extension_api.json': json.dumps([
682 {
683 'namespace': 'idle'
684 },
685 {
686 'namespace': 'menus'
687 }
688 ])
689 }
690 },
691 '396': {
692 'api': {
693 'extension_api.json': json.dumps([
694 {
695 'namespace': 'idle'
696 },
697 {
698 'namespace': 'experimental.menus'
699 }
700 ])
701 }
702 }
703 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698