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

Unified Diff: net/test/remote_test_server.cc

Issue 10986042: Fix the failed cases in URLFetcherFileTest on Android. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move GetDocumentRoot to test server Created 8 years, 2 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: net/test/remote_test_server.cc
diff --git a/net/test/remote_test_server.cc b/net/test/remote_test_server.cc
index 5020ca7f0c0dfe45f6e4037d3fa55358cf9ecbc9..71cf9360b4fbcc4c244ddcb20349a91c862304b2 100644
--- a/net/test/remote_test_server.cc
+++ b/net/test/remote_test_server.cc
@@ -183,5 +183,14 @@ bool RemoteTestServer::Init(const FilePath& document_root) {
return true;
}
+// On Android, the document root in device is not the same as the document root
+// in host machine where test server is launched. So append DIR_SOURCE_ROOT
wtc 2012/10/23 18:28:31 1. This method should be defined between Stop() an
Shouqun Liu 2012/10/24 02:32:47 Done.
+// here to get the actual path of document root on Android device.
+FilePath RemoteTestServer::GetDocumentRoot() const {
+ FilePath src_dir;
+ PathService::Get(base::DIR_SOURCE_ROOT, &src_dir);
+ return src_dir.Append(document_root());
+}
+
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698