Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: chrome/test/automation/proxy_launcher.h

Issue 4202004: Add named testing interface (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_
6 #define CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_
7
8 #include <string>
9
10 class AutomationProxy;
11 class UITestBase;
12
13 // Subclass from this class to use a different implementation of AutomationProxy
14 // or to use different channel IDs inside a class that derives from UITest.
15 class ProxyLauncher {
16 public:
17 virtual ~ProxyLauncher() {}
18
19 // Creates an automation proxy.
20 virtual AutomationProxy* CreateAutomationProxy(
21 int execution_timeout) const = 0;
22
23 // Launches the browser if needed and establishes a connection
24 // connection with it using the specified UITestBase.
25 virtual void InitializeConnection(UITestBase* ui_test_base) const = 0;
26
27 // Returns the automation proxy's channel with any prefixes prepended,
28 // for passing as a command line parameter over to the browser.
29 virtual std::string PrefixedChannelID() const = 0;
30
31 protected:
32 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.
33 };
34
35 // Uses an automation proxy that communicates over a named socket.
36 // The channel id is a constant specified by kInterfacePath.
37 class NamedProxyLauncher : public ProxyLauncher {
38 public:
39 explicit NamedProxyLauncher(bool disconnect_on_failure);
40 virtual AutomationProxy* CreateAutomationProxy(int execution_timeout) const;
41 virtual void InitializeConnection(UITestBase* ui_test_base) const;
42 virtual std::string PrefixedChannelID() const;
43
44 protected:
45 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure.
46 };
47
48 // Uses an automation proxy that communicates over an anonymous socket.
49 class AnonymousProxyLauncher : public ProxyLauncher {
50 public:
51 explicit AnonymousProxyLauncher(bool disconnect_on_failure);
52 virtual AutomationProxy* CreateAutomationProxy(int execution_timeout) const;
53 virtual void InitializeConnection(UITestBase* ui_test_base) const;
54 virtual std::string PrefixedChannelID() const;
55
56 protected:
57 bool disconnect_on_failure_; // True if we disconnect on IPC channel failure.
58 };
59
60 #endif // CHROME_TEST_AUTOMATION_PROXY_LAUNCHER_H_
61
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698