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

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

Issue 491653002: Docserver: Use GitilesFileSystem instead of SubversionFileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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/gitiles_file_system_test.py
diff --git a/chrome/common/extensions/docs/server2/gitiles_file_system_test.py b/chrome/common/extensions/docs/server2/gitiles_file_system_test.py
index 438a6595388b0dd062d2c259606eeb1c8675706f..e6590d4b0cc9912f38b89a616b1aa5b92510a1a7 100755
--- a/chrome/common/extensions/docs/server2/gitiles_file_system_test.py
+++ b/chrome/common/extensions/docs/server2/gitiles_file_system_test.py
@@ -65,7 +65,12 @@ class _FakeGitilesFetcher(object):
# GitilesFS expects directory content as a JSON string.
if 'JSON' in fmt:
content = json.dumps({
- 'entries': [{'name': name} for name in content]
+ 'entries': [
+ {
+ # GitilesFS expects directory names to not have a trailing '/'.
+ 'name': name.rstrip('/'),
+ 'type': 'tree' if name.endswith('/') else 'blob'
+ } for name in content]
})
return _Response(content)
return Future(callback=resolve)

Powered by Google App Engine
This is Rietveld 408576698