summaryrefslogtreecommitdiffstats
path: root/net/test/local_test_server.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/test/local_test_server.cc')
-rw-r--r--net/test/local_test_server.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/net/test/local_test_server.cc b/net/test/local_test_server.cc
index 17137a69..53879df 100644
--- a/net/test/local_test_server.cc
+++ b/net/test/local_test_server.cc
@@ -94,13 +94,19 @@ bool LocalTestServer::GetTestServerDirectory(FilePath* directory) {
return true;
}
+bool LocalTestServer::GetTestServerPath(FilePath* testserver_path) const {
+ if (!GetTestServerDirectory(testserver_path))
+ return false;
+ *testserver_path = testserver_path->Append(FILE_PATH_LITERAL(
+ "testserver.py"));
+ return true;
+}
+
bool LocalTestServer::Start() {
// Get path to Python server script.
FilePath testserver_path;
- if (!GetTestServerDirectory(&testserver_path))
+ if (!GetTestServerPath(&testserver_path))
return false;
- testserver_path =
- testserver_path.Append(FILE_PATH_LITERAL("testserver.py"));
if (!SetPythonPath())
return false;
@@ -159,8 +165,12 @@ bool LocalTestServer::Init(const FilePath& document_root) {
return true;
}
+bool LocalTestServer::SetPythonPath() const {
+ return SetPythonPathStatic();
+}
+
// static
-bool LocalTestServer::SetPythonPath() {
+bool LocalTestServer::SetPythonPathStatic() {
FilePath third_party_dir;
if (!PathService::Get(base::DIR_SOURCE_ROOT, &third_party_dir)) {
LOG(ERROR) << "Failed to get DIR_SOURCE_ROOT";