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

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: Make RemoteTestServer compile 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
Index: net/test/local_test_server.cc
diff --git a/net/test/local_test_server.cc b/net/test/local_test_server.cc
index 5e1e0e93765030d3ec3651465ec99e3cf0c20b71..7cb1a0ddcb3083d19466b05398e3f7883fc8b8a0 100644
--- a/net/test/local_test_server.cc
+++ b/net/test/local_test_server.cc
@@ -103,6 +103,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))
@@ -114,6 +118,10 @@ bool LocalTestServer::Start() {
if (!LaunchPython(testserver_path))
return false;
+ return true;
+}
+
+bool LocalTestServer::BlockUntilStarted() {
if (!WaitToStart()) {
Stop();
return false;

Powered by Google App Engine
This is Rietveld 408576698