Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1234)

Side by Side Diff: chrome/common/extensions/docs/server2/example_zipper_test.py

Issue 12996003: Dynamically generate a heading for Extension Docs API pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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 (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 os 6 import os
7 import sys 7 import sys
8 import unittest 8 import unittest
9 9
10 from compiled_file_system import CompiledFileSystem 10 from compiled_file_system import CompiledFileSystem
11 from example_zipper import ExampleZipper 11 from example_zipper import ExampleZipper
12 from in_memory_object_store import InMemoryObjectStore 12 from in_memory_object_store import InMemoryObjectStore
13 from local_file_system import LocalFileSystem 13 from local_file_system import LocalFileSystem
14 from memcache_file_system import MemcacheFileSystem 14 from memcache_file_system import MemcacheFileSystem
15 15
16 class ExampleZipperTest(unittest.TestCase): 16 class ExampleZipperTest(unittest.TestCase):
17 def setUp(self): 17 def setUp(self):
18 object_store = InMemoryObjectStore('') 18 object_store = InMemoryObjectStore('')
19 self._file_system = MemcacheFileSystem( 19 self._file_system = MemcacheFileSystem(
20 LocalFileSystem(os.path.join(sys.path[0], 'test_data')), 20 LocalFileSystem(os.path.join(sys.path[0], 'test_data')),
21 object_store) 21 object_store)
22 self._example_zipper = ExampleZipper( 22 self._example_zipper = ExampleZipper(
23 self._file_system, 23 self._file_system,
24 CompiledFileSystem.Factory(self._file_system, object_store), 24 CompiledFileSystem.Factory(self._file_system,
cduvall 2013/03/21 18:43:53 revert
epeterson 2013/03/25 19:35:11 Done.
25 object_store),
25 'example_zipper') 26 'example_zipper')
26 27
27 def testCreateZip(self): 28 def testCreateZip(self):
28 # Cache manifest.json as unicode and make sure ExampleZipper doesn't error. 29 # Cache manifest.json as unicode and make sure ExampleZipper doesn't error.
29 self._file_system.ReadSingle('example_zipper/basic/manifest.json') 30 self._file_system.ReadSingle('example_zipper/basic/manifest.json')
30 self.assertTrue(len(self._example_zipper.Create('basic')) > 0) 31 self.assertTrue(len(self._example_zipper.Create('basic')) > 0)
31 32
32 if __name__ == '__main__': 33 if __name__ == '__main__':
33 unittest.main() 34 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698