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

Unified Diff: net/test/spawned_test_server/remote_test_server.cc

Issue 257613006: Change the Android test server's cwd rather than mangle arguments. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix empty document root. Created 6 years, 8 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
Index: net/test/spawned_test_server/remote_test_server.cc
diff --git a/net/test/spawned_test_server/remote_test_server.cc b/net/test/spawned_test_server/remote_test_server.cc
index 594c5d488b480a717472259a860989ebeb5bfe89..13286a9b8380c7fd50be76618fe669aa4d5e5835 100644
--- a/net/test/spawned_test_server/remote_test_server.cc
+++ b/net/test/spawned_test_server/remote_test_server.cc
@@ -192,7 +192,12 @@ bool RemoteTestServer::Init(const base::FilePath& document_root) {
return false;
SetPort(test_server_port);
- SetResourcePath(document_root, base::FilePath().AppendASCII("net")
+ // Unlike LocalTestServer, RemoteTestServer passes relative paths to the test
+ // server. The test server fails on empty strings in some configurations.
+ base::FilePath fixed_root = document_root;
+ if (fixed_root.empty())
+ fixed_root = base::FilePath(base::FilePath::kCurrentDirectory);
+ SetResourcePath(fixed_root, base::FilePath().AppendASCII("net")
.AppendASCII("data")
.AppendASCII("ssl")
.AppendASCII("certificates"));

Powered by Google App Engine
This is Rietveld 408576698