| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 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 os | 7 import os |
| 8 import sys | 8 import sys |
| 9 import unittest | 9 import unittest |
| 10 | 10 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 'fake_channel', | 69 'fake_channel', |
| 70 api_data_factory, | 70 api_data_factory, |
| 71 self._fake_api_list_data_source_factory, | 71 self._fake_api_list_data_source_factory, |
| 72 self._fake_intro_data_source_factory, | 72 self._fake_intro_data_source_factory, |
| 73 self._fake_samples_data_source_factory, | 73 self._fake_samples_data_source_factory, |
| 74 self._fake_sidenav_data_source_factory, | 74 self._fake_sidenav_data_source_factory, |
| 75 compiled_fs_factory, | 75 compiled_fs_factory, |
| 76 reference_resolver_factory, | 76 reference_resolver_factory, |
| 77 self._manifest_data_source, | 77 self._manifest_data_source, |
| 78 '.', | 78 '.', |
| 79 '.')) | 79 '.', |
| 80 '/static')) |
| 80 | 81 |
| 81 def testSimple(self): | 82 def testSimple(self): |
| 82 self._base_path = os.path.join(self._base_path, 'simple') | 83 self._base_path = os.path.join(self._base_path, 'simple') |
| 83 fetcher = LocalFileSystem(self._base_path) | 84 fetcher = LocalFileSystem(self._base_path) |
| 84 compiled_fs_factory = CompiledFileSystem.Factory( | 85 compiled_fs_factory = CompiledFileSystem.Factory( |
| 85 fetcher, | 86 fetcher, |
| 86 ObjectStoreCreator.ForTest()) | 87 ObjectStoreCreator.ForTest()) |
| 87 t_data_source = self._CreateTemplateDataSource( | 88 t_data_source = self._CreateTemplateDataSource( |
| 88 compiled_fs_factory, | 89 compiled_fs_factory, |
| 89 ObjectStoreCreator.ForTest()) | 90 ObjectStoreCreator.ForTest()) |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 compiled_fs_factory, | 133 compiled_fs_factory, |
| 133 api_data=json.loads(self._ReadLocalFile('test1.json')))) | 134 api_data=json.loads(self._ReadLocalFile('test1.json')))) |
| 134 self._RenderTest( | 135 self._RenderTest( |
| 135 'test2', | 136 'test2', |
| 136 self._CreateTemplateDataSource( | 137 self._CreateTemplateDataSource( |
| 137 compiled_fs_factory, | 138 compiled_fs_factory, |
| 138 api_data=json.loads(self._ReadLocalFile('test2.json')))) | 139 api_data=json.loads(self._ReadLocalFile('test2.json')))) |
| 139 | 140 |
| 140 if __name__ == '__main__': | 141 if __name__ == '__main__': |
| 141 unittest.main() | 142 unittest.main() |
| OLD | NEW |