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

Side by Side Diff: chrome/common/extensions/docs/server2/path_canonicalizer_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 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 unittest 6 import unittest
7 7
8 from path_canonicalizer import PathCanonicalizer 8 from path_canonicalizer import PathCanonicalizer
9 from server_instance import ServerInstance 9 from server_instance import ServerInstance
10 import svn_constants 10
11 11
12 class PathCanonicalizerTest(unittest.TestCase): 12 class PathCanonicalizerTest(unittest.TestCase):
13 def setUp(self): 13 def setUp(self):
14 self._server_instance = ServerInstance.ForLocal() 14 self._server_instance = ServerInstance.ForLocal()
15 15
16 def _Cze(self, path): 16 def _Cze(self, path):
17 return self._server_instance.path_canonicalizer.Canonicalize(path) 17 return self._server_instance.path_canonicalizer.Canonicalize(path)
18 18
19 def testSpecifyCorrectly(self): 19 def testSpecifyCorrectly(self):
20 self._AssertIdentity('extensions/browserAction.html') 20 self._AssertIdentity('extensions/browserAction.html')
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 self.assertEqual(to, result.path) 77 self.assertEqual(to, result.path)
78 self.assertFalse(result.permanent) 78 self.assertFalse(result.permanent)
79 79
80 def _AssertPermanentRedirect(self, to, from_): 80 def _AssertPermanentRedirect(self, to, from_):
81 result = self._Cze(from_) 81 result = self._Cze(from_)
82 self.assertEqual(to, result.path) 82 self.assertEqual(to, result.path)
83 self.assertTrue(result.permanent) 83 self.assertTrue(result.permanent)
84 84
85 if __name__ == '__main__': 85 if __name__ == '__main__':
86 unittest.main() 86 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698