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

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

Issue 10832298: Extensions Docs Server: Fix PRESUBMIT.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for new memcache file system Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/common/extensions/docs/server2/PRESUBMIT.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/docs/server2/integration_test.py
diff --git a/chrome/common/extensions/docs/server2/integration_test.py b/chrome/common/extensions/docs/server2/integration_test.py
index 71afb041f9cf1401db8a7898115744268ec49c59..3d1e77ec751ee3faf7ad247e2c7abe2ca7f1cd9c 100755
--- a/chrome/common/extensions/docs/server2/integration_test.py
+++ b/chrome/common/extensions/docs/server2/integration_test.py
@@ -27,6 +27,27 @@ class FakeOmahaProxy(object):
def fetch(self, url):
return _ReadFile(os.path.join('test_data', 'branch_utility', 'first.json'))
+class FakeViewvcServer(object):
+ def __init__(self):
+ self._base_pattern = re.compile(r'.*chrome/common/extensions/(.*)')
+
+ def fetch(self, url):
+ path = os.path.join(
+ os.pardir, os.pardir, self._base_pattern.match(url).group(1))
+ if os.path.isdir(path):
+ html = ['<html><td>Directory revision:</td><td><a>000000</a></td>']
+ for f in os.listdir(path):
+ if f.startswith('.'):
+ continue
+ html.append('<td><a name="%s"></a></td>' % f)
+ if os.path.isdir(os.path.join(path, f)):
+ html.append('<td><a title="dir"><strong>000000</strong></a></td>')
+ else:
+ html.append('<td><a title="file"><strong>000000</strong></a></td>')
+ html.append('</html>')
+ return '\n'.join(html)
+ return _ReadFile(path)
+
class FakeSubversionServer(object):
def __init__(self):
self._base_pattern = re.compile(r'.*chrome/common/extensions/(.*)')
@@ -54,6 +75,7 @@ class FakeGithub(object):
appengine_wrappers.ConfigureFakeUrlFetch({
url_constants.OMAHA_PROXY_URL: FakeOmahaProxy(),
'%s/.*' % url_constants.SVN_URL: FakeSubversionServer(),
+ '%s/.*' % url_constants.VIEWVC_URL: FakeViewvcServer(),
'%s/.*' % url_constants.GITHUB_URL: FakeGithub()
})
« no previous file with comments | « chrome/common/extensions/docs/server2/PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698