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

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

Issue 68873003: Docserver: Serve docs out of src/ not src/chrome/common/extensions. This allows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix samples Created 7 years, 1 month 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 | Annotate | Revision Log
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 from copy import deepcopy 6 from copy import deepcopy
7 from file_system import FileNotFoundError, StatInfo 7 from file_system import FileNotFoundError, StatInfo
8 from test_file_system import TestFileSystem, _MoveTo 8 from test_file_system import TestFileSystem, MoveTo
9 import unittest 9 import unittest
10 10
11 11
12 _TEST_DATA = { 12 _TEST_DATA = {
13 '404.html': '404.html contents', 13 '404.html': '404.html contents',
14 'apps': { 14 'apps': {
15 'a11y.html': 'a11y.html contents', 15 'a11y.html': 'a11y.html contents',
16 'about_apps.html': 'about_apps.html contents', 16 'about_apps.html': 'about_apps.html contents',
17 'fakedir': { 17 'fakedir': {
18 'file.html': 'file.html contents' 18 'file.html': 'file.html contents'
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 137
138 fs.IncrementStat(path='extensions/alarms.html') 138 fs.IncrementStat(path='extensions/alarms.html')
139 self.assertEquals(StatInfo('3'), fs.Stat('404.html')) 139 self.assertEquals(StatInfo('3'), fs.Stat('404.html'))
140 self.assertEquals(StatInfo('3', child_versions={ 140 self.assertEquals(StatInfo('3', child_versions={
141 'activeTab.html': '2', 141 'activeTab.html': '2',
142 'alarms.html': '3', 142 'alarms.html': '3',
143 }), fs.Stat('extensions/')) 143 }), fs.Stat('extensions/'))
144 144
145 def testMoveTo(self): 145 def testMoveTo(self):
146 self.assertEqual({'foo': {'a': 'b', 'c': 'd'}}, 146 self.assertEqual({'foo': {'a': 'b', 'c': 'd'}},
147 _MoveTo('foo', {'a': 'b', 'c': 'd'})) 147 MoveTo('foo', {'a': 'b', 'c': 'd'}))
148 self.assertEqual({'foo': {'bar': {'a': 'b', 'c': 'd'}}}, 148 self.assertEqual({'foo': {'bar': {'a': 'b', 'c': 'd'}}},
149 _MoveTo('foo/bar', {'a': 'b', 'c': 'd'})) 149 MoveTo('foo/bar', {'a': 'b', 'c': 'd'}))
150 self.assertEqual({'foo': {'bar': {'baz': {'a': 'b'}}}}, 150 self.assertEqual({'foo': {'bar': {'baz': {'a': 'b'}}}},
151 _MoveTo('foo/bar/baz', {'a': 'b'})) 151 MoveTo('foo/bar/baz', {'a': 'b'}))
152 152
153 153
154 if __name__ == '__main__': 154 if __name__ == '__main__':
155 unittest.main() 155 unittest.main()
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/server2/test_file_system.py ('k') | chrome/common/extensions/docs/server2/test_servlet.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698