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; |