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" |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/process.h" | 15 #include "base/process.h" |
16 #include "base/scoped_temp_dir.h" | 16 #include "base/scoped_temp_dir.h" |
17 #include "base/time.h" | 17 #include "base/time.h" |
18 | 18 |
19 class AutomationProxy; | 19 class AutomationProxy; |
20 | 20 |
21 // Base class for all ProxyLauncher implementations. Contains functionality | 21 // Base class for all ProxyLauncher implementations. Contains functionality |
22 // fo launching, terminating, and connecting tests to browser processes. This | 22 // fo launching, terminating, and connecting tests to browser processes. This |
23 // class determines which AutomationProxy implementation is used by a test. | 23 // class determines which AutomationProxy implementation is used by a test. |
24 // Command line arguments passed to the browser are set in this class. | 24 // Command line arguments passed to the browser are set in this class. |
25 // | 25 // |
26 // Subclass from this class to use a different AutomationProxy | 26 // Subclass from this class to use a different AutomationProxy |
27 // implementation or to override browser launching behavior. | 27 // implementation or to override browser launching behavior. |
28 class ProxyLauncher { | 28 class ProxyLauncher { |
29 public: | 29 public: |
30 // Default path for named testing interface. | 30 // Default ID for named testing interface. |
31 static const char kDefaultInterfacePath[]; | 31 static const char kDefaultInterfaceId[]; |
32 | 32 |
33 // Different ways to quit the browser. | 33 // Different ways to quit the browser. |
34 enum ShutdownType { | 34 enum ShutdownType { |
35 WINDOW_CLOSE, | 35 WINDOW_CLOSE, |
36 USER_QUIT, | 36 USER_QUIT, |
37 SESSION_ENDING, | 37 SESSION_ENDING, |
38 }; | 38 }; |
39 | 39 |
40 // POD containing state variables that determine how to launch browser. | 40 // POD containing state variables that determine how to launch browser. |
41 struct LaunchState { | 41 struct LaunchState { |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 314 |
315 protected: | 315 protected: |
316 std::string channel_id_; // Channel id of automation proxy. | 316 std::string channel_id_; // Channel id of automation proxy. |
317 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. | 317 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. |
318 | 318 |
319 private: | 319 private: |
320 DISALLOW_COPY_AND_ASSIGN(AnonymousProxyLauncher); | 320 DISALLOW_COPY_AND_ASSIGN(AnonymousProxyLauncher); |
321 }; | 321 }; |
322 | 322 |
323 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ | 323 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
OLD | NEW |