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

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

Issue 10828235: Extensions Docs Server: Efficient MemcacheFileSystem (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes 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
Index: chrome/common/extensions/docs/server2/fake_url_fetcher.py
diff --git a/chrome/common/extensions/docs/server2/fake_url_fetcher.py b/chrome/common/extensions/docs/server2/fake_url_fetcher.py
index 99bae8d7ab77292b93a3b0d52a732486fd8dcfb7..ea4f5237b8d3af0ae4b12eb9c75b0737aa9550e4 100644
--- a/chrome/common/extensions/docs/server2/fake_url_fetcher.py
+++ b/chrome/common/extensions/docs/server2/fake_url_fetcher.py
@@ -21,6 +21,10 @@ class FakeUrlFetcher(object):
return f.read()
def _ListDir(self, directory):
+ # In some tests, we need to test listing a directory from the HTML returned
+ # from SVN. This reads an HTML file that has the directories HTML.
not at google - send to devlin 2012/08/13 23:02:14 Ah
+ if not os.path.isdir(os.path.join(self._base_path, directory)):
+ return self._ReadFile(directory[:-1])
files = os.listdir(os.path.join(self._base_path, directory))
html = '<html><title>Revision: 00000</title>\n'
for filename in files:

Powered by Google App Engine
This is Rietveld 408576698