Index: net/test/local_test_server.cc |
diff --git a/net/test/local_test_server.cc b/net/test/local_test_server.cc |
index a24d6bb0d25a6ab975fe167c5c4c660b64b5f3da..95ffa064b32b242515ad8486e08311a34b0f7fc8 100644 |
--- a/net/test/local_test_server.cc |
+++ b/net/test/local_test_server.cc |
@@ -140,9 +140,6 @@ bool LocalTestServer::Stop() { |
} |
bool LocalTestServer::Init(const FilePath& document_root) { |
- if (document_root.IsAbsolute()) |
- return false; |
- |
// At this point, the port that the test server will listen on is unknown. |
// The test server will listen on an ephemeral port, and write the port |
// number out over a pipe that this TestServer object will read from. Once |
@@ -153,7 +150,14 @@ bool LocalTestServer::Init(const FilePath& document_root) { |
FilePath src_dir; |
if (!PathService::Get(base::DIR_SOURCE_ROOT, &src_dir)) |
return false; |
- SetResourcePath(src_dir.Append(document_root), |
+ |
+ FilePath root; |
+ if (document_root.IsAbsolute()) |
+ root = document_root; |
+ else |
+ root = src_dir.Append(document_root); |
+ |
+ SetResourcePath(root, |
src_dir.AppendASCII("net") |
.AppendASCII("data") |
.AppendASCII("ssl") |