Chromium Code Reviews| 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: |