diff options
Diffstat (limited to 'chrome/test/ui_test_utils.h')
-rw-r--r-- | chrome/test/ui_test_utils.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/test/ui_test_utils.h b/chrome/test/ui_test_utils.h index 4902396..a0deb1c 100644 --- a/chrome/test/ui_test_utils.h +++ b/chrome/test/ui_test_utils.h @@ -321,12 +321,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(); @@ -337,6 +340,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_; |