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

Unified Diff: chrome/common/extensions/docs/server2/redirector_test.py

Issue 54603010: Docserver: Implement the content providers infrastructure, where a (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/docs/server2/redirector_test.py
diff --git a/chrome/common/extensions/docs/server2/redirector_test.py b/chrome/common/extensions/docs/server2/redirector_test.py
index 76c1ac769cba165492c94188683970ab49f96fbd..d5f58555ec81c226106d8039778de6d8ca5c36d9 100755
--- a/chrome/common/extensions/docs/server2/redirector_test.py
+++ b/chrome/common/extensions/docs/server2/redirector_test.py
@@ -15,28 +15,26 @@ from third_party.json_schema_compiler.json_parse import Parse
HOST = 'http://localhost/'
file_system = TestFileSystem({
- 'public': {
+ 'redirects.json': json.dumps({
+ '': '/index.html',
+ 'home': 'index.html',
+ 'index.html': 'http://something.absolute.com/'
+ }),
+ 'apps': {
'redirects.json': json.dumps({
- '': '/index.html',
- 'home': 'index.html',
- 'index.html': 'http://something.absolute.com/'
+ '': '../index.html',
+ 'index.html': 'about_apps.html'
+ })
+ },
+ 'extensions': {
+ 'redirects.json': json.dumps({
+ 'manifest': 'manifest.html'
}),
- 'apps': {
+ 'manifest': {
'redirects.json': json.dumps({
- '': '../index.html',
- 'index.html': 'about_apps.html'
+ '': '../manifest.html',
+ 'more-info': 'http://lmgtfy.com'
})
- },
- 'extensions': {
- 'redirects.json': json.dumps({
- 'manifest': 'manifest.html'
- }),
- 'manifest': {
- 'redirects.json': json.dumps({
- '': '../manifest.html',
- 'more-info': 'http://lmgtfy.com'
- })
- }
}
}
})
@@ -45,8 +43,7 @@ class RedirectorTest(unittest.TestCase):
def setUp(self):
self._redirector = Redirector(
CompiledFileSystem.Factory(ObjectStoreCreator.ForTest()),
- file_system,
- 'public')
+ file_system)
def testExternalRedirection(self):
self.assertEqual(
@@ -61,9 +58,9 @@ class RedirectorTest(unittest.TestCase):
'/apps/about_apps.html',
self._redirector.Redirect(HOST, 'apps/index.html'))
self.assertEqual(
- '/index.html', self._redirector.Redirect(HOST, ''))
+ '/index.html', self._redirector.Redirect(HOST, ''))
self.assertEqual(
- '/index.html', self._redirector.Redirect(HOST, 'home'))
+ '/index.html', self._redirector.Redirect(HOST, 'home'))
def testRelativeRedirection(self):
self.assertEqual(
@@ -93,10 +90,10 @@ class RedirectorTest(unittest.TestCase):
self._redirector.Cron()
expected_paths = set([
- 'public/redirects.json',
- 'public/apps/redirects.json',
- 'public/extensions/redirects.json',
- 'public/extensions/manifest/redirects.json'
+ 'redirects.json',
+ 'apps/redirects.json',
+ 'extensions/redirects.json',
+ 'extensions/manifest/redirects.json'
])
for path in expected_paths:
« no previous file with comments | « chrome/common/extensions/docs/server2/redirector.py ('k') | chrome/common/extensions/docs/server2/render_servlet.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698