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/platform_bundle_test.py

Issue 789643004: Move chrome.alarms API from chrome/ to extensions/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 10 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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import json 6 import json
7 import unittest 7 import unittest
8 8
9 from extensions_paths import CHROME_API, CHROME_EXTENSIONS 9 from extensions_paths import CHROME_API, CHROME_EXTENSIONS, EXTENSIONS_API
10 from mock_file_system import MockFileSystem 10 from mock_file_system import MockFileSystem
11 from server_instance import ServerInstance 11 from server_instance import ServerInstance
12 from test_file_system import TestFileSystem 12 from test_file_system import TestFileSystem
13 from test_util import ReadFile 13 from test_util import ReadFile
14 14
15 15
16 _TEST_DATA = { 16 _TEST_DATA = {
17 'api': { 17 'api': {
18 'devtools': { 18 'devtools': {
19 'inspected_window.json': ReadFile( 19 'inspected_window.json': ReadFile(
20 CHROME_API, 'devtools', 'inspected_window.json'), 20 CHROME_API, 'devtools', 'inspected_window.json'),
21 }, 21 },
22 '_api_features.json': json.dumps({ 22 '_api_features.json': json.dumps({
23 'alarms': {}, 23 'alarms': {},
24 'app': {'extension_types': ['platform_app']}, 24 'app': {'extension_types': ['platform_app']},
25 'app.runtime': {'noparent': True}, 25 'app.runtime': {'noparent': True},
26 'app.runtime.foo': {'extension_types': ['extension']}, 26 'app.runtime.foo': {'extension_types': ['extension']},
27 'declarativeWebRequest': {'extension_types': ['extension']}, 27 'declarativeWebRequest': {'extension_types': ['extension']},
28 'devtools.inspectedWindow': {'extension_types': ['extension']}, 28 'devtools.inspectedWindow': {'extension_types': ['extension']},
29 'input': {'extension_types': 'all'}, 29 'input': {'extension_types': 'all'},
30 'input.ime': {'extension_types': ['extension', 'platform_app']}, 30 'input.ime': {'extension_types': ['extension', 'platform_app']},
31 'storage': {'extension_types': ['extension']}, 31 'storage': {'extension_types': ['extension']},
32 }), 32 }),
33 '_manifest_features.json': '{}', 33 '_manifest_features.json': '{}',
34 '_permission_features.json': '{}', 34 '_permission_features.json': '{}',
35 'alarms.idl': ReadFile(CHROME_API, 'alarms.idl'), 35 'alarms.idl': ReadFile(EXTENSIONS_API, 'alarms.idl'),
36 'input_ime.json': ReadFile(CHROME_API, 'input_ime.json'), 36 'input_ime.json': ReadFile(CHROME_API, 'input_ime.json'),
37 'page_action.json': ReadFile(CHROME_API, 'page_action.json'), 37 'page_action.json': ReadFile(CHROME_API, 'page_action.json'),
38 }, 38 },
39 'docs': { 39 'docs': {
40 'templates': { 40 'templates': {
41 'json': { 41 'json': {
42 'manifest.json': '{}', 42 'manifest.json': '{}',
43 'permissions.json': '{}', 43 'permissions.json': '{}',
44 } 44 }
45 } 45 }
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 # Check that 'app' is resolved successfully in apps, but is None otherwise. 144 # Check that 'app' is resolved successfully in apps, but is None otherwise.
145 self.assertNotEqual( 145 self.assertNotEqual(
146 None, 146 None,
147 self._platform_bundle.GetReferenceResolver('apps').GetLink('app')) 147 self._platform_bundle.GetReferenceResolver('apps').GetLink('app'))
148 self.assertEqual( 148 self.assertEqual(
149 None, 149 None,
150 self._platform_bundle.GetReferenceResolver('extensions').GetLink('app')) 150 self._platform_bundle.GetReferenceResolver('extensions').GetLink('app'))
151 151
152 if __name__ == '__main__': 152 if __name__ == '__main__':
153 unittest.main() 153 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698