Chromium Code Reviews| Index: chrome/common/extensions/docs/server2/test_data/canned_data.py |
| diff --git a/chrome/common/extensions/docs/server2/test_data/canned_data.py b/chrome/common/extensions/docs/server2/test_data/canned_data.py |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..dd9132bacd70e5ca9657aa3ba486c46cf3d28f83 |
| --- /dev/null |
| +++ b/chrome/common/extensions/docs/server2/test_data/canned_data.py |
| @@ -0,0 +1,256 @@ |
| +# Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +CANNED_BRANCHES = { |
| + 'trunk' : 'trunk', |
| + 28 : 1500, |
| + 27 : 1453, |
| + 26 : 1410, |
| + 25 : 1364, |
| + 24 : 1312, |
| + 23 : 1271, |
| + 22 : 1229, |
| + 21 : 1180, |
| + 20 : 1132, |
| + 19 : 1084, |
| + 18 : 1025, |
| + 17 : 963, |
| + 16 : 912, |
| + 15 : 874, |
| + 14 : 835, |
| + 13 : 782, |
| + 12 : 742, |
| + 11 : 696, |
| + 10 : 648, |
| + 9 : 597, |
| + 8 : 552, |
| + 7 : 544, |
| + 6 : 495, |
| + 5 : 396 |
| +} |
| + |
| +CANNED_API_FILE_SYSTEM_DATA = { |
| + 'trunk': { |
| + 'docs': { |
| + 'templates': { |
| + 'json': { |
| + 'api_availabilities.json': '{"jsonAPI1": {"channel": "stable", "version": 10}, "jsonAPI2": {"channel": "trunk"}, "jsonAPI3" : {"channel": "dev"}}', |
| + 'intro_tables.json': '{"test": [{"Permissions": "probably none"}]}' |
|
not at google - send to devlin
2013/06/20 16:15:20
is there some kind of JSON pretty printer you can
epeterson
2013/06/21 00:48:26
I had some adventures with this change... But this
|
| + } |
| + } |
| + }, |
| + 'api': { |
| + '_api_features.json': '{"contextMenus": {"channel": "stable"}, "events": {"channel": "stable"}, "extension": {"channel": "stable"}}', |
| + '_manifest_features.json': '{"history": {"channel": "beta"}, "runtime": {"channel": "stable"}, "storage": {"channel": "beta"}, "sync": {"channel": "trunk"}}', |
| + '_permission_features.json': '{"alarms": {"channel": "stable"}, "bluetooth": {"channel": "dev"}, "bookmarks": {"channel": "stable"}, "cookies": {"channel": "dev"}, "declarativeContent": {"channel": "trunk"}, "falseBetaAPI": {"channel": "beta"}, "trunkAPI": {"channel": "trunk"}}', |
| + 'idle.json': 'idle contents', |
| + 'input_ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'tabs.json': 'tabs contents', |
| + 'windows.json': 'windows contents' |
| + } |
| + }, |
| + '1500': { |
| + 'api': { |
| + '_api_features.json': '{"events": {"channel": "trunk"}, "extension": {"channel": "stable"}, "systemInfo.stuff": {"channel": "dev"}}', |
| + '_manifest_features.json': '{"contextMenus": {"channel": "trunk"}, "notifications" : {"channel": "beta"}, "runtime": {"channel": "stable"}, "storage": {"channel": "dev"}, "sync": {"channel": "trunk"}}', |
| + '_permission_features.json': '{"alarms": {"channel": "stable"}, "bluetooth": {"channel": "dev"}, "bookmarks": {"channel": "stable"}, "cookies": {"channel": "dev"}, "declarativeContent": {"channel": "trunk"}, "downloads": {"channel": "beta"}}', |
| + 'idle.json': 'idle contents', |
| + 'input_ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'tabs.json': 'tabs contents', |
| + 'windows.json': 'windows contents' |
| + } |
| + }, |
| + '1453': { |
| + 'api': { |
| + '_api_features.json': '{"events": {"channel": "dev"}, "extension": {"channel": "stable"}, "systemInfo.cpu": {"channel": "stable"}, "systemInfo.stuff": {"channel": "dev"}}', |
| + '_manifest_features.json': '{"notifications": {"channel": "dev"}, "runtime": {"channel": "stable"}, "storage": {"channel": "dev"}}', |
| + '_permission_features.json': '{"alarms": {"channel": "stable"}, "bluetooth": {"channel": "dev"}, "bookmarks": {"channel": "stable"}, "declarativeContent": {"channel": "trunk"}, "downloads": {"channel": "dev"}, "context_menus": {"channel": "trunk"}}', |
| + 'idle.json': 'idle contents', |
| + 'input_ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'tabs.json': 'tabs contents', |
| + 'windows.json': 'windows contents' |
| + } |
| + }, |
| + '1410': { |
| + 'api': { |
| + '_manifest_features.json': '{"events": {"channel": "beta"}, "notifications": {"channel": "dev"}, "page_action": {"channel": "stable"}, "runtime": {"channel": "stable"}, "web_request": {"channel": "stable"}}', |
| + '_permission_features.json': '{"alarms": {"channel": "stable"}, "bluetooth": {"channel": "dev"}, "bookmarks": {"channel": "stable"}, "context_menus": {"channel": "trunk"}, "declarativeContent": {"channel": "trunk"}, "systemInfo.display": {"channel": "stable"}}', |
| + 'idle.json': 'idle contents', |
| + 'input_ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'tabs.json': 'tabs contents', |
| + 'windows.json': 'windows contents' |
| + } |
| + }, |
| + '1364': { |
| + 'api': { |
| + '_manifest_features.json': '{"page_action": {"channel": "stable"}, "runtime": {"channel": "stable"}}', |
| + '_permission_features.json': '{"alarms": {"channel": "stable"}, "bookmarks": {"channel": "stable"}, "systemInfo.display": {"channel": "stable"}, "webRequest": {"channel": "stable"}}', |
| + 'idle.json': 'idle contents', |
| + 'input_ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'tabs.json': 'tabs contents', |
| + 'windows.json': 'windows contents' |
| + } |
| + }, |
| + '1312': { |
| + 'api': { |
| + '_manifest_features.json': '{"page_action": {"channel": "stable"}, "runtime": {"channel": "stable"}, "web_request": {"channel": "stable"}}', |
| + '_permission_features.json': '{"alarms": {"channel": "stable"}, "bookmarks": {"channel": "stable"}, "systemInfo.display": {"channel": "stable"}}', |
| + 'idle.json': 'idle contents', |
| + 'input_ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'tabs.json': 'tabs contents', |
| + 'windows.json': 'windows contents' |
| + } |
| + }, |
| + '1271': { |
| + 'api': { |
| + '_manifest_features.json': '{"page_action": {"channel": "stable"}, "runtime": {"channel": "stable"}, "system_info_display": {"channel": "stable"}}', |
| + '_permission_features.json': '{"alarms": {"channel": "beta"}, "bookmarks": {"channel": "stable"}, "webRequest": {"channel": "stable"}}', |
| + 'idle.json': 'idle contents', |
| + 'input_ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'tabs.json': 'tabs contents', |
| + 'windows.json': 'windows contents' |
| + } |
| + }, |
| + '1229': { |
| + 'api': { |
| + '_manifest_features.json': '{"page_action": {"channel": "stable"}, "runtime": {"channel": "stable"}, "web_request": {"channel": "stable"}}', |
| + '_permission_features.json': '{"bookmarks": {"channel": "stable"}, "systemInfo.display": {"channel": "beta"}}', |
| + 'idle.json': 'idle contents', |
| + 'input_ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'tabs.json': 'tabs contents' |
| + } |
| + }, |
| + '1180': { |
| + 'api': { |
| + '_manifest_features.json': '{"page_action": {"channel": "stable"}, "runtime": {"channel": "stable"}}', |
| + '_permission_features.json': '{"bookmarks": {"channel": "stable"}, "webRequest": {"channel": "stable"}}', |
| + 'idle.json': 'idle contents', |
| + 'input_ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'tabs.json': 'tabs contents' |
| + } |
| + }, |
| + '1132': { |
| + 'api': { |
| + '_manifest_features.json': '{"page_action": {"channel": "stable"}}', |
| + '_permission_features.json': '{"webRequest": {"channel": "stable"}}', |
| + 'idle.json': 'idle contents', |
| + 'input.ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'tabs.json': 'tabs contents' |
| + } |
| + }, |
| + '1084': { |
| + 'api': { |
| + '_manifest_features.json': '{"contents": "nothing of interest here, really"}', |
| + 'idle.json': 'idle contents', |
| + 'input.ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'pageAction.json': 'pageAction contents', |
| + 'tabs.json': 'tabs contents', |
| + 'webRequest.json': 'webRequest contents' |
| + } |
| + }, |
| + '1025': { |
| + 'api': { |
| + 'idle.json': 'idle contents', |
| + 'input.ime.json': 'input.ime contents', |
| + 'menus.json': 'menus contents', |
| + 'pageAction.json': 'pageAction contents', |
| + 'tabs.json': 'tabs contents', |
| + 'webRequest.json': 'webRequest contents' |
| + } |
| + }, |
| + '963': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}, {"namespace": "pageAction"}, {"namespace": "webRequest"}]' |
| + } |
| + }, |
| + '912': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}, {"namespace": "pageAction"}, {"namespace": "experimental.webRequest"}]' |
| + } |
| + }, |
| + '874': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}, {"namespace": "pageAction"}]' |
| + } |
| + }, |
| + '835': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}, {"namespace": "pageAction"}]' |
| + } |
| + }, |
| + '782': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}, {"namespace": "pageAction"}]' |
| + } |
| + }, |
| + '742': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}, {"namespace": "pageAction"}]' |
| + } |
| + }, |
| + '696': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}, {"namespace": "pageAction"}]' |
| + } |
| + }, |
| + '648': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}, {"namespace": "pageAction"}]' |
| + } |
| + }, |
| + '597': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}, {"namespace": "pageAction"}]' |
| + } |
| + }, |
| + '552': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}, {"namespace": "pageAction"}]' |
| + } |
| + }, |
| + '544': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}]' |
| + } |
| + }, |
| + '495': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "menus"}]' |
| + } |
| + }, |
| + '396': { |
| + 'api': { |
| + 'extension_api.json': '[{"namespace": "idle"}, {"namespace": "experimental.menus"}]' |
| + } |
| + } |
| +} |
| + |
| +CANNED_TEST_FILE_SYSTEM_DATA = { |
| + 'api': { |
| + '_manifest_features.json': '{"manifest": "features"}', |
| + '_permission_features.json': '{"permission": "features"}' |
| + }, |
| + 'docs': { |
| + 'templates': { |
| + 'intros': { |
| + 'test.html': '<h1>hi</h1>you<h2>first</h2><h3>inner</h3><h2>second</h2>' |
| + }, |
| + 'json': { |
| + 'api_availabilities.json': '{"tester": "42"}', |
| + 'intro_tables.json': '{ "tester": {"Permissions": [{"permission": "tester" }, {"extra": "is an API." }], "LearnMore": [{"href": "https://tester.test.com/welcome.html", "content": "Welcome!" }]}}' |
| + } |
| + } |
| + } |
| +} |