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

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: refine the patch with nits fixed 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
« no previous file with comments | « net/test/remote_test_server.h ('k') | net/url_request/url_fetcher_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..45da5a583c5d7c01924118f70b995d59b36b571b 100644
--- a/net/test/remote_test_server.cc
+++ b/net/test/remote_test_server.cc
@@ -143,6 +143,16 @@ bool RemoteTestServer::Stop() {
return stopped;
}
+// On Android, the document root in the device is not the same as the document
+// root in the host machine where the test server is launched. So prepend
+// DIR_SOURCE_ROOT here to get the actual path of document root on the Android
+// device.
+FilePath RemoteTestServer::GetDocumentRoot() const {
+ FilePath src_dir;
+ PathService::Get(base::DIR_SOURCE_ROOT, &src_dir);
+ return src_dir.Append(document_root());
+}
+
bool RemoteTestServer::Init(const FilePath& document_root) {
if (document_root.IsAbsolute())
return false;
« no previous file with comments | « net/test/remote_test_server.h ('k') | net/url_request/url_fetcher_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698