summaryrefslogtreecommitdiffstats
path: root/net/test/remote_test_server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/test/remote_test_server.cc')
-rw-r--r--net/test/remote_test_server.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/net/test/remote_test_server.cc b/net/test/remote_test_server.cc
index 5020ca7..45da5a5 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;