OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ | 5 #ifndef CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
6 #define CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ | 6 #define CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 // Launches the IPC testing connection in client mode, | 82 // Launches the IPC testing connection in client mode, |
83 // which then attempts to connect to a browser. | 83 // which then attempts to connect to a browser. |
84 // Returns true on success. | 84 // Returns true on success. |
85 bool ConnectToRunningBrowser(bool wait_for_initial_loads) WARN_UNUSED_RESULT; | 85 bool ConnectToRunningBrowser(bool wait_for_initial_loads) WARN_UNUSED_RESULT; |
86 | 86 |
87 // Paired with LaunchBrowserAndServer(). | 87 // Paired with LaunchBrowserAndServer(). |
88 // Closes the browser and IPC testing server. | 88 // Closes the browser and IPC testing server. |
89 void CloseBrowserAndServer(); | 89 void CloseBrowserAndServer(); |
90 | 90 |
91 // Launches the browser with the given command line. Returns true on success. | 91 // Launches the browser with the given command line. Returns true on success. |
92 // TODO(phajdan.jr): Make LaunchBrowser private. Tests should use | 92 // TODO(phajdan.jr): Make LaunchBrowser private. |
93 // LaunchAnotherBrowserBlockUntilClosed. | |
94 bool LaunchBrowser(const LaunchState& state) WARN_UNUSED_RESULT; | 93 bool LaunchBrowser(const LaunchState& state) WARN_UNUSED_RESULT; |
95 | 94 |
96 #if !defined(OS_MACOSX) | |
97 // This function is not defined on the Mac because the concept | |
98 // doesn't apply to Mac; you can't have N browser processes. | |
99 | |
100 // Launches another browser process and waits for it to finish. | |
101 // Returns true on success. | |
102 bool LaunchAnotherBrowserBlockUntilClosed(const LaunchState& state); | |
103 #endif | |
104 | |
105 // Exits out of browser instance. | 95 // Exits out of browser instance. |
106 void QuitBrowser(); | 96 void QuitBrowser(); |
107 | 97 |
108 // Terminates the browser, simulates end of session. | 98 // Terminates the browser, simulates end of session. |
109 void TerminateBrowser(); | 99 void TerminateBrowser(); |
110 | 100 |
111 // Check that no processes related to Chrome exist, displaying | 101 // Check that no processes related to Chrome exist, displaying |
112 // the given message if any do. | 102 // the given message if any do. |
113 void AssertAppNotRunning(const std::string& error_message); | 103 void AssertAppNotRunning(const std::string& error_message); |
114 | 104 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 251 |
262 protected: | 252 protected: |
263 std::string channel_id_; // Channel id of automation proxy. | 253 std::string channel_id_; // Channel id of automation proxy. |
264 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. | 254 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. |
265 | 255 |
266 private: | 256 private: |
267 DISALLOW_COPY_AND_ASSIGN(AnonymousProxyLauncher); | 257 DISALLOW_COPY_AND_ASSIGN(AnonymousProxyLauncher); |
268 }; | 258 }; |
269 | 259 |
270 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ | 260 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
OLD | NEW |