canned_data.py revision 5f1c94371a64b3196d4be9466099bb892df9b88e
1# Copyright 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
5import json
6
7from extensions_paths import CHROME_EXTENSIONS
8from third_party.json_schema_compiler.json_parse import OrderedDict
9from test_file_system import MoveAllTo, MoveTo
10
11
12CANNED_CHANNELS = OrderedDict([
13  ('trunk', 'trunk'),
14  ('dev', 31),
15  ('beta', 30),
16  ('stable', 29)
17])
18
19
20CANNED_BRANCHES = OrderedDict([
21  ('trunk', 'trunk'),
22  (31, '1612'),
23  (30, '1599'),
24  (29, '1547'),
25  (28, '1500'),
26  (27, '1453'),
27  (26, '1410'),
28  (25, '1364'),
29  (24, '1312'),
30  (23, '1271'),
31  (22, '1229'),
32  (21, '1180'),
33  (20, '1132'),
34  (19, '1084'),
35  (18, '1025'),
36  (17, '963'),
37  (16, '912'),
38  (15, '874'),
39  (14, '835'),
40  (13, '782'),
41  (12, '742'),
42  (11, '696'),
43  (10, '648'),
44  ( 9, '597'),
45  ( 8, '552'),
46  ( 7, '544'),
47  ( 6, '495'),
48  ( 5, '396'),
49])
50
51
52CANNED_TEST_FILE_SYSTEM_DATA = MoveTo(CHROME_EXTENSIONS, {
53  'api': {
54    '_api_features.json': json.dumps({
55      'ref_test': { 'dependencies': ['permission:ref_test'] },
56      'tester': { 'dependencies': ['permission:tester', 'manifest:tester'] }
57    }),
58    '_manifest_features.json': '{}',
59    '_permission_features.json': '{}'
60  },
61  'docs': {
62    'templates': {
63      'articles': {
64        'test_article.html':
65            '<h1>hi</h1>you<h2>first</h2><h3>inner</h3><h2>second</h2>'
66      },
67      'intros': {
68        'test_intro.html':
69            'you<h2>first</h2><h3>inner</h3><h2>second</h2>'
70      },
71      'json': {
72        'api_availabilities.json': json.dumps({
73          'trunk_api': {
74            'channel': 'trunk'
75          },
76          'dev_api': {
77            'channel': 'dev'
78          },
79          'beta_api': {
80            'channel': 'beta'
81          },
82          'stable_api': {
83            'channel': 'stable',
84            'version': 20
85          }
86        }),
87        'intro_tables.json': json.dumps({
88          'tester': {
89            'Permissions': [
90              {
91                'class': 'override',
92                'text': '"tester"'
93              },
94              {
95                'text': 'is an API for testing things.'
96              }
97            ],
98            'Learn More': [
99              {
100                'link': 'https://tester.test.com/welcome.html',
101                'text': 'Welcome!'
102              }
103            ]
104          }
105        }),
106        'manifest.json': '{}',
107        'permissions.json': '{}'
108      },
109      'private': {
110        'intro_tables': {
111          'trunk_message.html': 'available on trunk'
112        },
113        'table_of_contents.html': '<table-of-contents>',
114      }
115    }
116  }
117})
118
119
120_TEST_WHATS_NEW_JSON = {
121  "backgroundpages.to-be-non-persistent": {
122    "type": "additionsToExistingApis",
123    "description": "backgrounds to be non persistent",
124    "version": 22
125  },
126  "chromeSetting.set-regular-only-scope": {
127    "type": "additionsToExistingApis",
128    "description": "ChromeSetting.set now has a regular_only scope.",
129    "version": 21
130  },
131  "manifest-v1-deprecated": {
132    "type": "manifestChanges",
133    "description": "Manifest version 1 was deprecated in Chrome 18",
134    "version": 20
135  }
136}
137
138
139CANNED_API_FILE_SYSTEM_DATA = MoveAllTo(CHROME_EXTENSIONS, {
140  'trunk': {
141    'api': {
142      '_api_features.json': json.dumps({
143        'alarm': {
144          'channel': 'stable'
145        },
146        'app.window': {
147          'channel': 'stable'
148        },
149        'browserAction': {
150          'channel': 'stable'
151        },
152        'contextMenus': {
153          'channel': 'stable'
154        },
155        'events': {
156          'channel': 'stable'
157        },
158        'extension': {
159          'channel': 'stable'
160        },
161        'signedInDevices': {
162          'channel': 'stable'
163        },
164        'systemInfo.cpu': {
165          'channel': 'stable'
166        },
167        'systemInfo.stuff': {
168          'channel': 'dev'
169        }
170      }),
171      '_manifest_features.json': json.dumps({
172        'history': {
173          'channel': 'beta'
174        },
175        'notifications': {
176          'channel': 'beta'
177        },
178        'page_action': {
179          'channel': 'stable'
180        },
181        'runtime': {
182          'channel': 'stable'
183        },
184        'storage': {
185          'channel': 'beta'
186        },
187        'sync': {
188          'channel': 'trunk'
189        },
190        'web_request': {
191          'channel': 'stable'
192        }
193      }),
194      '_permission_features.json': json.dumps({
195        'alarms': {
196          'channel': 'stable'
197        },
198        'bluetooth': {
199          'channel': 'dev'
200        },
201        'bookmarks': {
202          'channel': 'stable'
203        },
204        'cookies': {
205          'channel': 'dev'
206        },
207        'declarativeContent': {
208          'channel': 'trunk'
209        },
210        'declarativeWebRequest': [
211          { 'channel': 'beta',
212            'extension_types': ['extension']
213          },
214          { 'channel': 'stable',
215            'extension_types': ['extension'],
216            'whitelist': ['aaa']
217          },
218        ],
219        'falseBetaAPI': {
220          'channel': 'beta'
221        },
222        'systemInfo.display': {
223          'channel': 'stable'
224        },
225        'trunkAPI': {
226          'channel': 'trunk'
227        }
228      }),
229      'alarm.json': json.dumps([{
230        'namespace': 'alarm',
231        'description': '<code>alarm</code>'
232      }]),
233      'app_window.json': json.dumps([{
234        'namespace': 'app.window',
235        'description': '<code>app.window</code>'
236      }]),
237      'browser_action.json': json.dumps([{
238        'namespace': 'browserAction',
239        'description': '<code>browserAction</code>'
240      }]),
241      'bluetooth.idl': '\n'.join(('//Copyleft Schmopyright',
242                                  '',
243                                  '//An IDL description, oh my!',
244                                  'namespace bluetooth {',
245                                  '  dictionary Socket {',
246                                  '    long id;',
247                                  '  };',
248                                  '};')),
249      'context_menus.json': json.dumps([{
250        'namespace': 'contextMenus',
251        'description': ''
252      }]),
253      'json_stable_api.json': json.dumps([{
254        'namespace': 'jsonStableAPI',
255        'description': 'An API with a predetermined availability.'
256      }]),
257      'idle.json': json.dumps([{'namespace': 'idle', 'description': ''}]),
258      'input_ime.json': json.dumps([{
259        'namespace': 'input.ime',
260        'description': 'An API that has the potential to cause some trouble.'
261      }]),
262      'menus.json': json.dumps([{'namespace': 'menus', 'description': ''}]),
263      'signed_in_devices.json': json.dumps([{
264        'namespace': 'signedInDevices',
265        'description': 'Another API that could cause some trouble.'
266      }]),
267      'system_info_stuff.json': json.dumps([{
268        'namespace': 'systemInfo.stuff',
269        'description': 'Yet another API that could wreck havoc...'
270      }]),
271      'tabs.json': json.dumps([{'namespace': 'tabs', 'description': ''}]),
272      'windows.json': json.dumps([{'namespace': 'windows', 'description': ''}])
273    },
274    'docs': {
275      'templates': {
276        'json': {
277          'api_availabilities.json': json.dumps({
278            'jsonTrunkAPI': {
279              'channel': 'trunk'
280            },
281            'jsonDevAPI': {
282              'channel': 'dev'
283            },
284            'jsonBetaAPI': {
285              'channel': 'beta'
286            },
287            'jsonStableAPI': {
288              'channel': 'stable',
289              'version': 20
290            }
291          }),
292          'intro_tables.json': json.dumps({
293            'test': [
294              {
295                'Permissions': 'probably none'
296              }
297            ]
298          }),
299          'manifest.json': '{}',
300          'permissions.json': '{}',
301          'whats_new.json': json.dumps(_TEST_WHATS_NEW_JSON)
302        },
303        'public': {
304          'apps': {
305            'alarm.html': 'alarm.html',
306            'app_window.html': 'app_window.html',
307            'contextMenus.html': 'contextMenus.html',
308          },
309          'extensions': {
310            'alarm.html': 'alarm.html',
311            'browserAction.html': 'browserAction.html',
312            'contextMenus.html': 'contextMenus.html',
313          }
314        }
315      }
316    }
317  },
318  '1612': {
319    'api': {
320      '_api_features.json': json.dumps({
321        'alarm': {
322          'channel': 'stable'
323        },
324        'app.window': {
325          'channel': 'stable'
326        },
327        'browserAction': {
328          'channel': 'stable'
329        },
330        'events': {
331          'channel': 'trunk'
332        },
333        'extension': {
334          'channel': 'stable'
335        },
336        'systemInfo.cpu': {
337          'channel': 'stable'
338        },
339        'systemInfo.stuff': {
340          'channel': 'dev'
341        }
342      }),
343      '_manifest_features.json': json.dumps({
344        'contextMenus': {
345          'channel': 'trunk'
346        },
347        'notifications': {
348          'channel': 'beta'
349        },
350        'page_action': {
351          'channel': 'stable'
352        },
353        'runtime': {
354          'channel': 'stable'
355        },
356        'storage': {
357          'channel': 'dev'
358        },
359        'sync': {
360          'channel': 'trunk'
361        },
362        'system_info_display': {
363          'channel': 'stable'
364        },
365        'web_request': {
366          'channel': 'stable'
367        }
368      }),
369      '_permission_features.json': json.dumps({
370        'alarms': {
371          'channel': 'stable'
372        },
373        'appsFirst': {
374          'channel': 'stable',
375          'extension_types': ['extension', 'platform_app']
376        },
377        'bluetooth': {
378          'channel': 'dev'
379        },
380        'bookmarks': {
381          'channel': 'stable'
382        },
383        'cookies': {
384          'channel': 'dev'
385        },
386        'declarativeContent': {
387          'channel': 'trunk'
388        },
389        'declarativeWebRequest': [
390          { 'channel': 'beta' },
391          { 'channel': 'stable', 'whitelist': ['aaa'] }
392        ],
393        'downloads': {
394          'channel': 'beta'
395        }
396      }),
397      'alarm.json': json.dumps([{
398        'namespace': 'alarm',
399        'description': '<code>alarm</code>'
400      }]),
401      'app_window.json': json.dumps([{
402        'namespace': 'app.window',
403        'description': '<code>app.window</code>'
404      }]),
405      'browser_action.json': json.dumps([{
406        'namespace': 'browserAction',
407        'description': '<code>browserAction</code>'
408      }]),
409      'idle.json': json.dumps([{'namespace': 'idle'}]),
410      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
411      'menus.json': json.dumps([{'namespace': 'menus'}]),
412      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
413      'windows.json': json.dumps([{'namespace': 'windows'}])
414    },
415    'docs': {
416      'templates': {
417        'json': {
418          'api_availabilities.json': json.dumps({
419            'jsonTrunkAPI': {
420              'channel': 'trunk'
421            },
422            'jsonDevAPI': {
423              'channel': 'dev'
424            },
425            'jsonBetaAPI': {
426              'channel': 'beta'
427            },
428            'jsonStableAPI': {
429              'channel': 'stable',
430              'version': 20
431            }
432          }),
433          'intro_tables.json': json.dumps({
434            'test': [
435              {
436                'Permissions': 'probably none'
437              }
438            ]
439          }),
440          'manifest.json': '{}',
441          'permissions.json': '{}',
442          'whats_new.json': json.dumps(_TEST_WHATS_NEW_JSON)
443        },
444        'public': {
445          'apps': {
446            'alarm.html': 'alarm.html',
447            'app_window.html': 'app_window.html',
448          },
449          'extensions': {
450            'alarm.html': 'alarm.html',
451            'browserAction.html': 'browserAction.html',
452          }
453        }
454      }
455    }
456  },
457  '1599': {
458    'api': {
459      '_api_features.json': json.dumps({
460        'alarm': {
461          'channel': 'stable'
462        },
463        'app.window': {
464          'channel': 'stable'
465        },
466        'browserAction': {
467          'channel': 'stable'
468        },
469        'events': {
470          'channel': 'trunk'
471        },
472        'extension': {
473          'channel': 'stable'
474        },
475        'systemInfo.cpu': {
476          'channel': 'beta'
477        },
478        'systemInfo.stuff': {
479          'channel': 'dev'
480        }
481      }),
482      '_manifest_features.json': json.dumps({
483        'contextMenus': {
484          'channel': 'trunk'
485        },
486        'notifications': {
487          'channel': 'dev'
488        },
489        'page_action': {
490          'channel': 'stable'
491        },
492        'runtime': {
493          'channel': 'stable'
494        },
495        'storage': {
496          'channel': 'dev'
497        },
498        'sync': {
499          'channel': 'trunk'
500        },
501        'system_info_display': {
502          'channel': 'stable'
503        },
504        'web_request': {
505          'channel': 'stable'
506        }
507      }),
508      '_permission_features.json': json.dumps({
509        'alarms': {
510          'channel': 'stable'
511        },
512        'appsFirst': {
513          'channel': 'stable',
514          'extension_types': ['extension', 'platform_app']
515        },
516        'bluetooth': {
517          'channel': 'dev'
518        },
519        'bookmarks': {
520          'channel': 'stable'
521        },
522        'cookies': {
523          'channel': 'dev'
524        },
525        'declarativeContent': {
526          'channel': 'trunk'
527        },
528        'declarativeWebRequest': [
529          { 'channel': 'beta' },
530          { 'channel': 'stable', 'whitelist': ['aaa'] }
531        ],
532        'downloads': {
533          'channel': 'beta'
534        }
535      }),
536      'alarm.json': json.dumps([{
537        'namespace': 'alarm',
538        'description': '<code>alarm</code>'
539      }]),
540      'app_window.json': json.dumps([{
541        'namespace': 'app.window',
542        'description': '<code>app.window</code>'
543      }]),
544      'browser_action.json': json.dumps([{
545        'namespace': 'browserAction',
546        'description': '<code>browserAction</code>'
547      }]),
548      'idle.json': json.dumps([{'namespace': 'idle'}]),
549      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
550      'menus.json': json.dumps([{'namespace': 'menus'}]),
551      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
552      'windows.json': json.dumps([{'namespace': 'windows'}])
553    },
554    'docs': {
555      'templates': {
556        'json': {
557          'api_availabilities.json': json.dumps({
558            'jsonTrunkAPI': {
559              'channel': 'trunk'
560            },
561            'jsonDevAPI': {
562              'channel': 'dev'
563            },
564            'jsonBetaAPI': {
565              'channel': 'beta'
566            },
567            'jsonStableAPI': {
568              'channel': 'stable',
569              'version': 20
570            }
571          }),
572          'intro_tables.json': json.dumps({
573            'test': [
574              {
575                'Permissions': 'probably none'
576              }
577            ]
578          }),
579          'manifest.json': '{}',
580          'permissions.json': '{}',
581          'whats_new.json': json.dumps(_TEST_WHATS_NEW_JSON)
582        },
583        'public': {
584          'apps': {
585            'alarm.html': 'alarm.html',
586            'app_window.html': 'app_window.html',
587          },
588          'extensions': {
589            'alarm.html': 'alarm.html',
590            'browserAction.html': 'browserAction.html',
591          }
592        }
593      }
594    }
595  },
596  '1547': {
597    'api': {
598      '_api_features.json': json.dumps({
599        'alarm': {
600          'channel': 'stable'
601        },
602        'app.window': {
603          'channel': 'stable'
604        },
605        'browserAction': {
606          'channel': 'stable'
607        },
608        'events': {
609          'channel': 'trunk'
610        },
611        'extension': {
612          'channel': 'stable'
613        },
614        'systemInfo.stuff': {
615          'channel': 'dev'
616        }
617      }),
618      '_manifest_features.json': json.dumps({
619        'contextMenus': {
620          'channel': 'trunk'
621        },
622        'notifications': {
623          'channel': 'dev'
624        },
625        'page_action': {
626          'channel': 'stable'
627        },
628        'runtime': {
629          'channel': 'stable'
630        },
631        'storage': {
632          'channel': 'dev'
633        },
634        'sync': {
635          'channel': 'trunk'
636        },
637        'system_info_display': {
638          'channel': 'stable'
639        },
640        'web_request': {
641          'channel': 'stable'
642        }
643      }),
644      '_permission_features.json': json.dumps({
645        'alarms': {
646          'channel': 'stable'
647        },
648        'appsFirst': {
649          'channel': 'stable',
650          'extension_types': ['extension', 'platform_app']
651        },
652        'bluetooth': {
653          'channel': 'dev'
654        },
655        'bookmarks': {
656          'channel': 'stable'
657        },
658        'cookies': {
659          'channel': 'dev'
660        },
661        'declarativeContent': {
662          'channel': 'trunk'
663        },
664        'declarativeWebRequest': [
665          { 'channel': 'beta' },
666          { 'channel': 'stable', 'whitelist': ['aaa'] }
667        ],
668        'downloads': {
669          'channel': 'beta'
670        }
671      }),
672      'alarm.json': json.dumps([{
673        'namespace': 'alarm',
674        'description': '<code>alarm</code>'
675      }]),
676      'app_window.json': json.dumps([{
677        'namespace': 'app.window',
678        'description': '<code>app.window</code>'
679      }]),
680      'browser_action.json': json.dumps([{
681        'namespace': 'browserAction',
682        'description': '<code>browserAction</code>'
683      }]),
684      'idle.json': json.dumps([{'namespace': 'idle'}]),
685      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
686      'menus.json': json.dumps([{'namespace': 'menus'}]),
687      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
688      'windows.json': json.dumps([{'namespace': 'windows'}])
689    },
690    'docs': {
691      'templates': {
692        'json': {
693          'api_availabilities.json': json.dumps({
694            'jsonTrunkAPI': {
695              'channel': 'trunk'
696            },
697            'jsonDevAPI': {
698              'channel': 'dev'
699            },
700            'jsonBetaAPI': {
701              'channel': 'beta'
702            },
703            'jsonStableAPI': {
704              'channel': 'stable',
705              'version': 20
706            }
707          }),
708          'intro_tables.json': json.dumps({
709            'test': [
710              {
711                'Permissions': 'probably none'
712              }
713            ]
714          }),
715          'manifest.json': '{}',
716          'permissions.json': '{}',
717          'whats_new.json': json.dumps(_TEST_WHATS_NEW_JSON)
718        },
719        'public': {
720          'apps': {
721            'alarm.html': 'alarm.html',
722            'app_window.html': 'app_window.html',
723          },
724          'extensions': {
725            'alarm.html': 'alarm.html',
726            'browserAction.html': 'browserAction.html',
727          }
728        }
729      }
730    }
731  },
732  '1500': {
733    'api': {
734      '_api_features.json': json.dumps({
735        'alarm': {
736          'channel': 'stable'
737        },
738        'app.window': {
739          'channel': 'stable'
740        },
741        'browserAction': {
742          'channel': 'stable'
743        },
744        'events': {
745          'channel': 'trunk'
746        },
747        'extension': {
748          'channel': 'stable'
749        },
750        'systemInfo.stuff': {
751          'channel': 'dev'
752        }
753      }),
754      '_manifest_features.json': json.dumps({
755        'contextMenus': {
756          'channel': 'trunk'
757        },
758        'notifications': {
759          'channel': 'dev'
760        },
761        'page_action': {
762          'channel': 'stable'
763        },
764        'runtime': {
765          'channel': 'stable'
766        },
767        'storage': {
768          'channel': 'dev'
769        },
770        'sync': {
771          'channel': 'trunk'
772        },
773        'system_info_display': {
774          'channel': 'stable'
775        },
776        'web_request': {
777          'channel': 'stable'
778        }
779      }),
780      '_permission_features.json': json.dumps({
781        'alarms': {
782          'channel': 'stable'
783        },
784        'appsFirst': {
785          'channel': 'stable',
786          'extension_types': ['extension', 'platform_app']
787        },
788        'bluetooth': {
789          'channel': 'dev'
790        },
791        'bookmarks': {
792          'channel': 'stable'
793        },
794        'cookies': {
795          'channel': 'dev'
796        },
797        'declarativeContent': {
798          'channel': 'trunk'
799        },
800        'declarativeWebRequest': [
801          { 'channel': 'beta' },
802          { 'channel': 'stable', 'whitelist': ['aaa'] }
803        ],
804        'downloads': {
805          'channel': 'beta'
806        }
807      }),
808      'alarm.json': json.dumps([{
809        'namespace': 'alarm',
810        'description': '<code>alarm</code>'
811      }]),
812      'app_window.json': json.dumps([{
813        'namespace': 'app.window',
814        'description': '<code>app.window</code>'
815      }]),
816      'browser_action.json': json.dumps([{
817        'namespace': 'browserAction',
818        'description': '<code>browserAction</code>'
819      }]),
820      'idle.json': json.dumps([{'namespace': 'idle'}]),
821      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
822      'menus.json': json.dumps([{'namespace': 'menus'}]),
823      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
824      'windows.json': json.dumps([{'namespace': 'windows'}])
825    },
826    'docs': {
827      'templates': {
828        'json': {
829          'api_availabilities.json': json.dumps({
830            'jsonTrunkAPI': {
831              'channel': 'trunk'
832            },
833            'jsonDevAPI': {
834              'channel': 'dev'
835            },
836            'jsonBetaAPI': {
837              'channel': 'beta'
838            },
839            'jsonStableAPI': {
840              'channel': 'stable',
841              'version': 20
842            }
843          }),
844          'intro_tables.json': json.dumps({
845            'test': [
846              {
847                'Permissions': 'probably none'
848              }
849            ]
850          }),
851          'manifest.json': '{}',
852          'permissions.json': '{}',
853          'whats_new.json': json.dumps(_TEST_WHATS_NEW_JSON)
854        },
855        'public': {
856          'apps': {
857            'alarm.html': 'alarm.html',
858            'app_window.html': 'app_window.html',
859          },
860          'extensions': {
861            'alarm.html': 'alarm.html',
862            'browserAction.html': 'browserAction.html',
863          }
864        }
865      }
866    }
867  },
868  '1453': {
869    'api': {
870      '_api_features.json': json.dumps({
871        'alarm': {
872          'channel': 'stable'
873        },
874        'app.window': {
875          'channel': 'stable'
876        },
877        'browserAction': {
878          'channel': 'stable'
879        },
880        'events': {
881          'channel': 'dev'
882        },
883        'extension': {
884          'channel': 'stable'
885        },
886        'systemInfo.stuff': {
887          'channel': 'dev'
888        }
889      }),
890      '_manifest_features.json': json.dumps({
891        'notifications': {
892          'channel': 'dev'
893        },
894        'page_action': {
895          'channel': 'stable'
896        },
897        'runtime': {
898          'channel': 'stable'
899        },
900        'storage': {
901          'channel': 'dev'
902        },
903        'system_info_display': {
904          'channel': 'stable'
905        },
906        'web_request': {
907          'channel': 'stable'
908        }
909      }),
910      '_permission_features.json': json.dumps({
911        'alarms': {
912          'channel': 'stable'
913        },
914        'appsFirst': {
915          'channel': 'stable',
916          'extension_types': ['extension', 'platform_app']
917        },
918        'bluetooth': {
919          'channel': 'dev'
920        },
921        'bookmarks': {
922          'channel': 'stable'
923        },
924        'context_menus': {
925          'channel': 'trunk'
926        },
927        'declarativeContent': {
928          'channel': 'trunk'
929        },
930        'declarativeWebRequest': [
931          { 'channel': 'beta' },
932          { 'channel': 'stable', 'whitelist': ['aaa'] }
933        ],
934        'downloads': {
935          'channel': 'dev'
936        }
937      }),
938      'alarm.json': json.dumps([{
939        'namespace': 'alarm',
940        'description': '<code>alarm</code>'
941      }]),
942      'app_window.json': json.dumps([{
943        'namespace': 'app.window',
944        'description': '<code>app.window</code>'
945      }]),
946      'browser_action.json': json.dumps([{
947        'namespace': 'browserAction',
948        'description': '<code>browserAction</code>'
949      }]),
950      'idle.json': json.dumps([{'namespace': 'idle'}]),
951      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
952      'menus.json': json.dumps([{'namespace': 'menus'}]),
953      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
954      'windows.json': json.dumps([{'namespace': 'windows'}])
955    },
956    'docs': {
957      'templates': {
958        'json': {
959          'api_availabilities.json': json.dumps({
960            'jsonTrunkAPI': {
961              'channel': 'trunk'
962            },
963            'jsonDevAPI': {
964              'channel': 'dev'
965            },
966            'jsonBetaAPI': {
967              'channel': 'beta'
968            },
969            'jsonStableAPI': {
970              'channel': 'stable',
971              'version': 20
972            }
973          }),
974          'intro_tables.json': json.dumps({
975            'test': [
976              {
977                'Permissions': 'probably none'
978              }
979            ]
980          }),
981          'manifest.json': '{}',
982          'permissions.json': '{}',
983          'whats_new.json': json.dumps(_TEST_WHATS_NEW_JSON)
984        },
985        'public': {
986          'apps': {
987            'alarm.html': 'alarm.html',
988            'app_window.html': 'app_window.html',
989          },
990          'extensions': {
991            'alarm.html': 'alarm.html',
992            'browserAction.html': 'browserAction.html',
993          }
994
995        }
996      }
997    }
998  },
999  '1410': {
1000    'api': {
1001      '_manifest_features.json': json.dumps({
1002        'alarm': {
1003          'channel': 'stable'
1004        },
1005        'app.window': {
1006          'channel': 'stable'
1007        },
1008        'browserAction': {
1009          'channel': 'stable'
1010        },
1011        'events': {
1012          'channel': 'beta'
1013        },
1014        'notifications': {
1015          'channel': 'dev'
1016        },
1017        'page_action': {
1018          'channel': 'stable'
1019        },
1020        'runtime': {
1021          'channel': 'stable'
1022        },
1023        'web_request': {
1024          'channel': 'stable'
1025        }
1026      }),
1027      '_permission_features.json': json.dumps({
1028        'alarms': {
1029          'channel': 'stable'
1030        },
1031        'appsFirst': {
1032          'channel': 'stable',
1033          'extension_types': ['extension', 'platform_app']
1034        },
1035        'bluetooth': {
1036          'channel': 'dev'
1037        },
1038        'bookmarks': {
1039          'channel': 'stable'
1040        },
1041        'context_menus': {
1042          'channel': 'trunk'
1043        },
1044        'declarativeContent': {
1045          'channel': 'trunk'
1046        },
1047        'declarativeWebRequest': [
1048          { 'channel': 'beta' },
1049          { 'channel': 'stable', 'whitelist': ['aaa'] }
1050        ],
1051        'systemInfo.display': {
1052          'channel': 'stable'
1053        }
1054      }),
1055      'alarm.json': json.dumps([{
1056        'namespace': 'alarm',
1057        'description': '<code>alarm</code>'
1058      }]),
1059      'app_window.json': json.dumps([{
1060        'namespace': 'app.window',
1061        'description': '<code>app.window</code>'
1062      }]),
1063      'browser_action.json': json.dumps([{
1064        'namespace': 'browserAction',
1065        'description': '<code>browserAction</code>'
1066      }]),
1067      'idle.json': json.dumps([{'namespace': 'idle'}]),
1068      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
1069      'menus.json': json.dumps([{'namespace': 'menus'}]),
1070      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
1071      'windows.json': json.dumps([{'namespace': 'windows'}])
1072    }
1073  },
1074  '1364': {
1075    'api': {
1076      '_manifest_features.json': json.dumps({
1077        'page_action': {
1078          'channel': 'stable'
1079        },
1080        'runtime': {
1081          'channel': 'stable'
1082        }
1083      }),
1084      '_permission_features.json': json.dumps({
1085        'alarms': {
1086          'channel': 'stable'
1087        },
1088        'appsFirst': {
1089          'channel': 'stable',
1090          'extension_types': ['platform_app']
1091        },
1092        'bookmarks': {
1093          'channel': 'stable'
1094        },
1095        'systemInfo.display': {
1096          'channel': 'stable'
1097        },
1098        'webRequest': {
1099          'channel': 'stable'
1100        }
1101      }),
1102      'idle.json': json.dumps([{'namespace': 'idle'}]),
1103      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
1104      'menus.json': json.dumps([{'namespace': 'menus'}]),
1105      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
1106      'windows.json': json.dumps([{'namespace': 'windows'}])
1107    }
1108  },
1109  '1312': {
1110    'api': {
1111      '_manifest_features.json': json.dumps({
1112        'page_action': {
1113          'channel': 'stable'
1114        },
1115        'runtime': {
1116          'channel': 'stable'
1117        },
1118        'web_request': {
1119          'channel': 'stable'
1120        }
1121      }),
1122      '_permission_features.json': json.dumps({
1123        'alarms': {
1124          'channel': 'stable'
1125        },
1126        'bookmarks': {
1127          'channel': 'stable'
1128        },
1129        'systemInfo.display': {
1130          'channel': 'stable'
1131        }
1132      }),
1133      'idle.json': json.dumps([{'namespace': 'idle'}]),
1134      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
1135      'menus.json': json.dumps([{'namespace': 'menus'}]),
1136      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
1137      'windows.json': json.dumps([{'namespace': 'windows'}])
1138    }
1139  },
1140  '1271': {
1141    'api': {
1142      '_manifest_features.json': json.dumps({
1143        'page_action': {
1144          'channel': 'stable'
1145        },
1146        'runtime': {
1147          'channel': 'stable'
1148        },
1149        'system_info_display': {
1150          'channel': 'stable'
1151        }
1152      }),
1153      '_permission_features.json': json.dumps({
1154        'alarms': {
1155          'channel': 'beta'
1156        },
1157        'bookmarks': {
1158          'channel': 'stable'
1159        },
1160        'webRequest': {
1161          'channel': 'stable'
1162        }
1163      }),
1164      'alarms.idl': '//copy\n\n//desc\nnamespace alarms {}',
1165      'idle.json': json.dumps([{'namespace': 'idle'}]),
1166      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
1167      'menus.json': json.dumps([{'namespace': 'menus'}]),
1168      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
1169      'windows.json': json.dumps([{'namespace': 'windows'}])
1170    }
1171  },
1172  '1229': {
1173    'api': {
1174      '_manifest_features.json': json.dumps({
1175        'page_action': {
1176          'channel': 'stable'
1177        },
1178        'runtime': {
1179          'channel': 'stable'
1180        },
1181        'web_request': {
1182          'channel': 'stable'
1183        }
1184      }),
1185      '_permission_features.json': json.dumps({
1186        'bookmarks': {
1187          'channel': 'stable'
1188        },
1189        'systemInfo.display': {
1190          'channel': 'beta'
1191        }
1192      }),
1193      'alarms.idl': '//copy\n\n//desc\nnamespace alarms {}',
1194      'idle.json': json.dumps([{'namespace': 'idle'}]),
1195      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
1196      'menus.json': json.dumps([{'namespace': 'menus'}]),
1197      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
1198    }
1199  },
1200  '1180': {
1201    'api': {
1202      '_manifest_features.json': json.dumps({
1203        'page_action': {
1204          'channel': 'stable'
1205        },
1206        'runtime': {
1207          'channel': 'stable'
1208        }
1209      }),
1210      '_permission_features.json': json.dumps({
1211        'bookmarks': {
1212          'channel': 'stable'
1213        },
1214        'webRequest': {
1215          'channel': 'stable'
1216        }
1217      }),
1218      'bookmarks.json': json.dumps([{'namespace': 'bookmarks'}]),
1219      'idle.json': json.dumps([{'namespace': 'idle'}]),
1220      'input_ime.json': json.dumps([{'namespace': 'input.ime'}]),
1221      'menus.json': json.dumps([{'namespace': 'menus'}]),
1222      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
1223    }
1224  },
1225  '1132': {
1226    'api': {
1227      '_manifest_features.json': json.dumps({
1228        'bookmarks': {
1229          'channel': 'trunk'
1230        },
1231        'page_action': {
1232          'channel': 'stable'
1233        }
1234      }),
1235      '_permission_features.json': json.dumps({
1236        'webRequest': {
1237          'channel': 'stable'
1238        }
1239      }),
1240      'bookmarks.json': json.dumps([{'namespace': 'bookmarks'}]),
1241      'idle.json': json.dumps([{'namespace': 'idle'}]),
1242      'input.ime.json': json.dumps([{'namespace': 'input.ime'}]),
1243      'menus.json': json.dumps([{'namespace': 'menus'}]),
1244      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
1245    }
1246  },
1247  '1084': {
1248    'api': {
1249      '_manifest_features.json': json.dumps({
1250        'contents': 'nothing of interest here,really'
1251      }),
1252      'bookmarks.json': json.dumps([{'namespace': 'bookmarks'}]),
1253      'idle.json': json.dumps([{'namespace': 'idle'}]),
1254      'input.ime.json': json.dumps([{'namespace': 'input.ime'}]),
1255      'menus.json': json.dumps([{'namespace': 'menus'}]),
1256      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
1257      'pageAction.json': json.dumps([{'namespace': 'pageAction'}]),
1258      'webRequest.json': json.dumps([{'namespace': 'webRequest'}])
1259    }
1260  },
1261  '1025': {
1262    'api': {
1263      'bookmarks.json': json.dumps([{'namespace': 'bookmarks'}]),
1264      'idle.json': json.dumps([{'namespace': 'idle'}]),
1265      'input.ime.json': json.dumps([{'namespace': 'input.ime'}]),
1266      'menus.json': json.dumps([{'namespace': 'menus'}]),
1267      'tabs.json': json.dumps([{'namespace': 'tabs'}]),
1268      'pageAction.json': json.dumps([{'namespace': 'pageAction'}]),
1269      'webRequest.json': json.dumps([{'namespace': 'webRequest'}])
1270    }
1271  },
1272  '963': {
1273    'api': {
1274      'extension_api.json': json.dumps([
1275        {
1276          'namespace': 'idle'
1277        },
1278        {
1279          'namespace': 'menus'
1280        },
1281        {
1282          'namespace': 'pageAction'
1283        },
1284        {
1285          'namespace': 'webRequest'
1286        }
1287      ])
1288    }
1289  },
1290  '912': {
1291    'api': {
1292      'extension_api.json': json.dumps([
1293        {
1294          'namespace': 'idle'
1295        },
1296        {
1297          'namespace': 'menus'
1298        },
1299        {
1300          'namespace': 'pageAction'
1301        },
1302        {
1303          'namespace': 'experimental.webRequest'
1304        }
1305      ])
1306    }
1307  },
1308  '874': {
1309    'api': {
1310      'extension_api.json': json.dumps([
1311        {
1312          'namespace': 'idle'
1313        },
1314        {
1315          'namespace': 'menus'
1316        },
1317        {
1318          'namespace': 'pageAction'
1319        }
1320      ])
1321    }
1322  },
1323  '835': {
1324    'api': {
1325      'extension_api.json': json.dumps([
1326        {
1327          'namespace': 'idle'
1328        },
1329        {
1330          'namespace': 'menus'
1331        },
1332        {
1333          'namespace': 'pageAction'
1334        }
1335      ])
1336    }
1337  },
1338  '782': {
1339    'api': {
1340      'extension_api.json': json.dumps([
1341        {
1342          'namespace': 'idle'
1343        },
1344        {
1345          'namespace': 'menus'
1346        },
1347        {
1348          'namespace': 'pageAction'
1349        }
1350      ])
1351    }
1352  },
1353  '742': {
1354    'api': {
1355      'extension_api.json': json.dumps([
1356        {
1357          'namespace': 'idle'
1358        },
1359        {
1360          'namespace': 'menus'
1361        },
1362        {
1363          'namespace': 'pageAction'
1364        }
1365      ])
1366    }
1367  },
1368  '696': {
1369    'api': {
1370      'extension_api.json': json.dumps([
1371        {
1372          'namespace': 'idle'
1373        },
1374        {
1375          'namespace': 'menus'
1376        },
1377        {
1378          'namespace': 'pageAction'
1379        }
1380      ])
1381    }
1382  },
1383  '648': {
1384    'api': {
1385      'extension_api.json': json.dumps([
1386        {
1387          'namespace': 'idle'
1388        },
1389        {
1390          'namespace': 'menus'
1391        },
1392        {
1393          'namespace': 'pageAction'
1394        }
1395      ])
1396    }
1397  },
1398  '597': {
1399    'api': {
1400      'extension_api.json': json.dumps([
1401        {
1402          'namespace': 'idle'
1403        },
1404        {
1405          'namespace': 'menus'
1406        },
1407        {
1408          'namespace': 'pageAction'
1409        }
1410      ])
1411    }
1412  },
1413  '552': {
1414    'api': {
1415      'extension_api.json': json.dumps([
1416        {
1417          'namespace': 'idle'
1418        },
1419        {
1420          'namespace': 'menus'
1421        },
1422        {
1423          'namespace': 'pageAction'
1424        }
1425      ])
1426    }
1427  },
1428  '544': {
1429    'api': {
1430      'extension_api.json': json.dumps([
1431        {
1432          'namespace': 'idle'
1433        },
1434        {
1435          'namespace': 'menus'
1436        }
1437      ])
1438    }
1439  },
1440  '495': {
1441    'api': {
1442      'extension_api.json': json.dumps([
1443        {
1444          'namespace': 'idle'
1445        },
1446        {
1447          'namespace': 'menus'
1448        }
1449      ])
1450    }
1451  },
1452  '396': {
1453    'api': {
1454      'extension_api.json': json.dumps([
1455        {
1456          'namespace': 'idle'
1457        },
1458        {
1459          'namespace': 'experimental.menus'
1460        }
1461      ])
1462    }
1463  }
1464})
1465