summaryrefslogtreecommitdiffstats
path: root/chrome/test/base/ui_test_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/base/ui_test_utils.h')
-rw-r--r--chrome/test/base/ui_test_utils.h71
1 files changed, 0 insertions, 71 deletions
diff --git a/chrome/test/base/ui_test_utils.h b/chrome/test/base/ui_test_utils.h
index 039972e..32e59fc 100644
--- a/chrome/test/base/ui_test_utils.h
+++ b/chrome/test/base/ui_test_utils.h
@@ -12,8 +12,6 @@
#include <vector>
#include "base/basictypes.h"
-#include "base/process.h"
-#include "base/scoped_temp_dir.h"
#include "base/string16.h"
#include "chrome/browser/ui/view_ids.h"
#include "content/public/browser/browser_thread.h"
@@ -29,10 +27,6 @@
#include "ui/ui_controls/ui_controls.h"
#include "webkit/glue/window_open_disposition.h"
-#if defined(OS_WIN)
-#include "base/win/scoped_handle.h"
-#endif
-
#if defined(TOOLKIT_VIEWS)
#include "ui/views/view.h"
#endif
@@ -46,7 +40,6 @@ class FilePath;
class HistoryService;
class MessageLoop;
class Profile;
-class ScopedTempDir;
class SkBitmap;
class TabContents;
class TemplateURLService;
@@ -238,70 +231,6 @@ bool SendMouseMoveSync(const gfx::Point& location) WARN_UNUSED_RESULT;
bool SendMouseEventsSync(ui_controls::MouseButton type,
int state) WARN_UNUSED_RESULT;
-// This is a utility class for running a python websocket server
-// during tests. The server is started during the construction of the
-// object, and is stopped when the destructor is called. Note that
-// because of the underlying script that is used:
-//
-// third_paty/WebKit/Tools/Scripts/new-run-webkit-websocketserver
-//
-// Only *_wsh.py handlers found under "http/tests/websocket/tests" from the
-// |root_directory| will be found and active while running the test
-// server.
-class TestWebSocketServer {
- public:
- TestWebSocketServer();
-
- // Stops the python websocket server if it was already started.
- ~TestWebSocketServer();
-
- // Use a random port, useful for tests that are sharded. Returns the port.
- int UseRandomPort();
-
- // Serves with TLS.
- void UseTLS();
-
- // 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();
-
- // Creates a CommandLine for invoking the python interpreter.
- CommandLine* CreatePythonCommandLine();
-
- // 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_;
-
- // Used to close the same python interpreter when server falls out
- // scope.
- FilePath websocket_pid_file_;
-
-#if defined(OS_POSIX)
- // ProcessHandle used to terminate child process.
- base::ProcessHandle process_group_id_;
-#elif defined(OS_WIN)
- // JobObject used to clean up orphaned child process.
- base::win::ScopedHandle job_handle_;
-#endif
-
- // Holds port number which the python websocket server uses.
- int port_;
-
- // If the python websocket server serves with TLS.
- bool secure_;
-
- DISALLOW_COPY_AND_ASSIGN(TestWebSocketServer);
-};
-
// A WindowedNotificationObserver hard-wired to observe
// chrome::NOTIFICATION_TAB_ADDED.
class WindowedTabAddedNotificationObserver