Index: net/test/local_test_server.cc |
diff --git a/net/test/local_test_server.cc b/net/test/local_test_server.cc |
index cd0cadd4a0ad062ea4c4983fe3995951144f6af3..a24d6bb0d25a6ab975fe167c5c4c660b64b5f3da 100644 |
--- a/net/test/local_test_server.cc |
+++ b/net/test/local_test_server.cc |
@@ -91,6 +91,10 @@ bool LocalTestServer::GetTestServerPath(FilePath* testserver_path) const { |
} |
bool LocalTestServer::Start() { |
+ return StartInBackground() && BlockUntilStarted(); |
+} |
+ |
+bool LocalTestServer::StartInBackground() { |
// Get path to Python server script. |
FilePath testserver_path; |
if (!GetTestServerPath(&testserver_path)) |
@@ -102,6 +106,10 @@ bool LocalTestServer::Start() { |
if (!LaunchPython(testserver_path)) |
return false; |
+ return true; |
+} |
+ |
+bool LocalTestServer::BlockUntilStarted() { |
if (!WaitToStart()) { |
Stop(); |
return false; |