| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 }) | 132 }) |
| 133 } | 133 } |
| 134 } | 134 } |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 | 137 |
| 138 | 138 |
| 139 class FeaturesBundleTest(unittest.TestCase): | 139 class FeaturesBundleTest(unittest.TestCase): |
| 140 def setUp(self): | 140 def setUp(self): |
| 141 self._server = ServerInstance.ForTest( | 141 self._server = ServerInstance.ForTest( |
| 142 TestFileSystem(_TEST_FILESYSTEM, relative_to=EXTENSIONS)) | 142 TestFileSystem(_TEST_FILESYSTEM, relative_to=CHROME_EXTENSIONS)) |
| 143 | 143 |
| 144 def testManifestFeatures(self): | 144 def testManifestFeatures(self): |
| 145 expected_features = { | 145 expected_features = { |
| 146 'background': { | 146 'background': { |
| 147 'name': 'background', | 147 'name': 'background', |
| 148 'channel': 'stable', | 148 'channel': 'stable', |
| 149 'platforms': ['extensions'], | 149 'platforms': ['extensions'], |
| 150 'documentation': 'background_pages.html' | 150 'documentation': 'background_pages.html' |
| 151 }, | 151 }, |
| 152 'manifest_version': { | 152 'manifest_version': { |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 'dependencies': ['api:tabs'] | 257 'dependencies': ['api:tabs'] |
| 258 } | 258 } |
| 259 } | 259 } |
| 260 self.assertEqual( | 260 self.assertEqual( |
| 261 expected_features, | 261 expected_features, |
| 262 self._server.features_bundle.GetAPIFeatures().Get()) | 262 self._server.features_bundle.GetAPIFeatures().Get()) |
| 263 | 263 |
| 264 | 264 |
| 265 if __name__ == '__main__': | 265 if __name__ == '__main__': |
| 266 unittest.main() | 266 unittest.main() |
| OLD | NEW |