| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 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 EXTENSIONS | 9 from extensions_paths import CHROME_EXTENSIONS |
| 10 from server_instance import ServerInstance | 10 from server_instance import ServerInstance |
| 11 from test_file_system import TestFileSystem | 11 from test_file_system import TestFileSystem |
| 12 | 12 |
| 13 | 13 |
| 14 _TEST_FILESYSTEM = { | 14 _TEST_FILESYSTEM = { |
| 15 'api': { | 15 'api': { |
| 16 '_api_features.json': json.dumps({ | 16 '_api_features.json': json.dumps({ |
| 17 'audioCapture': { | 17 'audioCapture': { |
| 18 'channel': 'stable', | 18 'channel': 'stable', |
| 19 'extension_types': ['platform_app'] | 19 'extension_types': ['platform_app'] |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 }) | 131 }) |
| 132 } | 132 } |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 | 136 |
| 137 | 137 |
| 138 class FeaturesBundleTest(unittest.TestCase): | 138 class FeaturesBundleTest(unittest.TestCase): |
| 139 def setUp(self): | 139 def setUp(self): |
| 140 self._server = ServerInstance.ForTest( | 140 self._server = ServerInstance.ForTest( |
| 141 TestFileSystem(_TEST_FILESYSTEM, relative_to=EXTENSIONS)) | 141 TestFileSystem(_TEST_FILESYSTEM, relative_to=CHROME_EXTENSIONS)) |
| 142 | 142 |
| 143 def testManifestFeatures(self): | 143 def testManifestFeatures(self): |
| 144 expected_features = { | 144 expected_features = { |
| 145 'background': { | 145 'background': { |
| 146 'name': 'background', | 146 'name': 'background', |
| 147 'channel': 'stable', | 147 'channel': 'stable', |
| 148 'platforms': ['extensions'], | 148 'platforms': ['extensions'], |
| 149 'documentation': 'background_pages.html' | 149 'documentation': 'background_pages.html' |
| 150 }, | 150 }, |
| 151 'manifest_version': { | 151 'manifest_version': { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 'dependencies': ['api:tabs'] | 256 'dependencies': ['api:tabs'] |
| 257 } | 257 } |
| 258 } | 258 } |
| 259 self.assertEqual( | 259 self.assertEqual( |
| 260 expected_features, | 260 expected_features, |
| 261 self._server.features_bundle.GetAPIFeatures().Get()) | 261 self._server.features_bundle.GetAPIFeatures().Get()) |
| 262 | 262 |
| 263 | 263 |
| 264 if __name__ == '__main__': | 264 if __name__ == '__main__': |
| 265 unittest.main() | 265 unittest.main() |
| OLD | NEW |