Index: chrome/test/ui_test_utils.h |
diff --git a/chrome/test/ui_test_utils.h b/chrome/test/ui_test_utils.h |
index 5299451be35246be39bc9230e5cf3b76bc54d62c..323e3744a44fe16e5afc83816eb9effab2d68b0c 100644 |
--- a/chrome/test/ui_test_utils.h |
+++ b/chrome/test/ui_test_utils.h |
@@ -280,12 +280,15 @@ class TimedMessageLoopRunner { |
// server. |
class TestWebSocketServer { |
public: |
- // Creates and starts a python websocket server with |root_directory|. |
- explicit TestWebSocketServer(const FilePath& root_directory); |
+ TestWebSocketServer(); |
- // Destroys and stops the server. |
+ // Stops the python websocket server if it was already started. |
~TestWebSocketServer(); |
+ // Starts the python websocket server using |root_directory|. Returns whether |
+ // the server was successfully started. |
+ bool Start(const FilePath& root_directory); |
+ |
private: |
// Sets up PYTHONPATH to run websocket_server.py. |
void SetPythonPath(); |
@@ -296,6 +299,9 @@ class TestWebSocketServer { |
// Creates a CommandLine for invoking the python websocker server. |
CommandLine* CreateWebSocketServerCommandLine(); |
+ // Has the server been started? |
+ bool started_; |
+ |
// A Scoped temporary directory for holding the python pid file. |
ScopedTempDir temp_dir_; |