Index: chrome/test/automation/proxy_launcher.h |
=================================================================== |
--- chrome/test/automation/proxy_launcher.h (revision 0) |
+++ chrome/test/automation/proxy_launcher.h (revision 0) |
@@ -0,0 +1,61 @@ |
+// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
+#define CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
+ |
+#include <string> |
+ |
+class AutomationProxy; |
+class UITestBase; |
+ |
+// Subclass from this class to use a different implementation of AutomationProxy |
+// or to use different channel IDs inside a class that derives from UITest. |
+class ProxyLauncher { |
+ public: |
+ virtual ~ProxyLauncher() {} |
+ |
+ // Creates an automation proxy. |
+ virtual AutomationProxy* CreateAutomationProxy( |
+ int execution_timeout) const = 0; |
+ |
+ // Launches the browser if needed and establishes a connection |
+ // connection with it using the specified UITestBase. |
+ virtual void InitializeConnection(UITestBase* ui_test_base) const = 0; |
+ |
+ // Returns the automation proxy's channel with any prefixes prepended, |
+ // for passing as a command line parameter over to the browser. |
+ virtual std::string PrefixedChannelID() const = 0; |
+ |
+ protected: |
+ std::string channel_id_; // Channel id of automation proxy. |
Paweł Hajdan Jr.
2010/11/10 11:15:44
nit: A member variable doesn't make sense in a cla
dtu
2010/11/11 00:10:54
Done.
|
+}; |
+ |
+// Uses an automation proxy that communicates over a named socket. |
+// The channel id is a constant specified by kInterfacePath. |
+class NamedProxyLauncher : public ProxyLauncher { |
+ public: |
+ explicit NamedProxyLauncher(bool disconnect_on_failure); |
+ virtual AutomationProxy* CreateAutomationProxy(int execution_timeout) const; |
+ virtual void InitializeConnection(UITestBase* ui_test_base) const; |
+ virtual std::string PrefixedChannelID() const; |
+ |
+ protected: |
+ bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. |
+}; |
+ |
+// Uses an automation proxy that communicates over an anonymous socket. |
+class AnonymousProxyLauncher : public ProxyLauncher { |
+ public: |
+ explicit AnonymousProxyLauncher(bool disconnect_on_failure); |
+ virtual AutomationProxy* CreateAutomationProxy(int execution_timeout) const; |
+ virtual void InitializeConnection(UITestBase* ui_test_base) const; |
+ virtual std::string PrefixedChannelID() const; |
+ |
+ protected: |
+ bool disconnect_on_failure_; // True if we disconnect on IPC channel failure. |
+}; |
+ |
+#endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_ |
+ |
Property changes on: chrome/test/automation/proxy_launcher.h |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |