| Index: net/test/remote_test_server.cc
|
| diff --git a/net/test/remote_test_server.cc b/net/test/remote_test_server.cc
|
| index 3421fa55ebecd27cac35f6b07a85022624f92e1a..f806195f895af34499e81401140b423719afc7c0 100644
|
| --- a/net/test/remote_test_server.cc
|
| +++ b/net/test/remote_test_server.cc
|
| @@ -161,9 +161,6 @@ FilePath RemoteTestServer::GetDocumentRoot() const {
|
| }
|
|
|
| bool RemoteTestServer::Init(const FilePath& document_root) {
|
| - if (document_root.IsAbsolute())
|
| - return false;
|
| -
|
| // Gets ports information used by test server spawner and Python test server.
|
| int test_server_port = 0;
|
|
|
| @@ -193,10 +190,20 @@ bool RemoteTestServer::Init(const FilePath& document_root) {
|
| return false;
|
| SetPort(test_server_port);
|
|
|
| - SetResourcePath(document_root, FilePath().AppendASCII("net")
|
| - .AppendASCII("data")
|
| - .AppendASCII("ssl")
|
| - .AppendASCII("certificates"));
|
| + FilePath root;
|
| + if (document_root.IsAbsolute()) {
|
| + root = document_root;
|
| + } else {
|
| + FilePath src_dir;
|
| + if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir))
|
| + return false;
|
| + root = src_dir.Append(document_root);
|
| + }
|
| +
|
| + SetResourcePath(root, FilePath().AppendASCII("net")
|
| + .AppendASCII("data")
|
| + .AppendASCII("ssl")
|
| + .AppendASCII("certificates"));
|
| return true;
|
| }
|
|
|
|
|