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

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

Issue 68873003: Docserver: Serve docs out of src/ not src/chrome/common/extensions. This allows (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix samples 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/test_util.py
diff --git a/chrome/common/extensions/docs/server2/test_util.py b/chrome/common/extensions/docs/server2/test_util.py
index 27287bf81ee192753428db1cf21e5c76e319458f..95db17651fe45a8927e77ed5dc30ebfd2758b4a4 100644
--- a/chrome/common/extensions/docs/server2/test_util.py
+++ b/chrome/common/extensions/docs/server2/test_util.py
@@ -52,6 +52,11 @@ def _ReplaceLogging(name, replacement):
return decorator
-def ReadFile(*path):
- with open(os.path.join(sys.path[0], '..', '..', *path)) as f:
+def ChromiumPath(*path):
+ return os.path.join(
+ sys.path[0], '..', '..', '..', '..', '..', *path)
+
+
+def ReadFile(*path, **read_args):
+ with open(ChromiumPath(*path), **read_args) as f:
return f.read()

Powered by Google App Engine
This is Rietveld 408576698