summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authordtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-31 19:28:00 +0000
committerdtu@chromium.org <dtu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-31 19:28:00 +0000
commitdce050dc0b29bdf9077ca491ea400f48253abd8b (patch)
tree7d51cb610cda10730273ef8b258ac215899adef2 /chrome/test/automation
parent78c52ff1676a5aee32833d42a1828ac7dd443066 (diff)
downloadchromium_src-dce050dc0b29bdf9077ca491ea400f48253abd8b.zip
chromium_src-dce050dc0b29bdf9077ca491ea400f48253abd8b.tar.gz
chromium_src-dce050dc0b29bdf9077ca491ea400f48253abd8b.tar.bz2
Add channel_id parameter for NamedProxyLauncher constructor.
BUG=none TEST=none Review URL: http://codereview.chromium.org/6336018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73173 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/proxy_launcher.cc15
-rw-r--r--chrome/test/automation/proxy_launcher.h6
2 files changed, 13 insertions, 8 deletions
diff --git a/chrome/test/automation/proxy_launcher.cc b/chrome/test/automation/proxy_launcher.cc
index 028849d..0a02144 100644
--- a/chrome/test/automation/proxy_launcher.cc
+++ b/chrome/test/automation/proxy_launcher.cc
@@ -32,9 +32,6 @@ namespace {
// Passed as value of kTestType.
const char kUITestType[] = "ui";
-// Default path of named testing interface.
-const char kInterfacePath[] = "/var/tmp/ChromeTestingInterface";
-
// Rewrite the preferences file to point to the proper image directory.
void RewritePreferencesFile(const FilePath& user_data_dir) {
const FilePath pref_template_path(
@@ -98,6 +95,9 @@ void UpdateHistoryDates(const FilePath& user_data_dir) {
// ProxyLauncher functions
+const char ProxyLauncher::kDefaultInterfacePath[] =
+ "/var/tmp/ChromeTestingInterface";
+
bool ProxyLauncher::in_process_renderer_ = false;
bool ProxyLauncher::no_sandbox_ = false;
bool ProxyLauncher::full_memory_dump_ = false;
@@ -484,11 +484,12 @@ base::TimeDelta ProxyLauncher::browser_quit_time() const {
// NamedProxyLauncher functions
-NamedProxyLauncher::NamedProxyLauncher(bool launch_browser,
+NamedProxyLauncher::NamedProxyLauncher(const std::string& channel_id,
+ bool launch_browser,
bool disconnect_on_failure)
- : launch_browser_(launch_browser),
+ : channel_id_(channel_id),
+ launch_browser_(launch_browser),
disconnect_on_failure_(disconnect_on_failure) {
- channel_id_ = kInterfacePath;
}
AutomationProxy* NamedProxyLauncher::CreateAutomationProxy(
@@ -507,7 +508,7 @@ void NamedProxyLauncher::InitializeConnection(const LaunchState& state,
// Wait for browser to be ready for connections.
struct stat file_info;
- while (stat(kInterfacePath, &file_info))
+ while (stat(channel_id_.c_str(), &file_info))
base::PlatformThread::Sleep(automation::kSleepTime);
}
diff --git a/chrome/test/automation/proxy_launcher.h b/chrome/test/automation/proxy_launcher.h
index 97d2dd4..bdb8dc5 100644
--- a/chrome/test/automation/proxy_launcher.h
+++ b/chrome/test/automation/proxy_launcher.h
@@ -25,6 +25,9 @@ class AutomationProxy;
// implementation or to override browser launching behavior.
class ProxyLauncher {
public:
+ // Default path for named testing interface.
+ static const char kDefaultInterfacePath[];
+
// Profile theme type choices.
enum ProfileType {
DEFAULT_THEME = 0,
@@ -297,7 +300,8 @@ class NamedProxyLauncher : public ProxyLauncher {
public:
// If launch_browser is true, launches Chrome with named interface enabled.
// Otherwise, there should be an existing instance the proxy can connect to.
- NamedProxyLauncher(bool launch_browser, bool disconnect_on_failure);
+ NamedProxyLauncher(const std::string& channel_id,
+ bool launch_browser, bool disconnect_on_failure);
virtual AutomationProxy* CreateAutomationProxy(int execution_timeout);
virtual void InitializeConnection(const LaunchState& state,