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

Unified Diff: net/test/local_test_server.cc

Issue 12033057: Make PPAPI test servers start in parallel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit Created 7 years, 11 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
« no previous file with comments | « net/test/local_test_server.h ('k') | net/test/remote_test_server.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « net/test/local_test_server.h ('k') | net/test/remote_test_server.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698