summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorrobertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 18:08:17 +0000
committerrobertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 18:08:17 +0000
commita7eee32f5e2250e5bf8d2b47612e9de140a7e850 (patch)
treef2566d8b303f7bfce163023218424b701af95b65 /chrome/test
parent8538894e63ccd5239049484737fb4b819fe49bad (diff)
downloadchromium_src-a7eee32f5e2250e5bf8d2b47612e9de140a7e850.zip
chromium_src-a7eee32f5e2250e5bf8d2b47612e9de140a7e850.tar.gz
chromium_src-a7eee32f5e2250e5bf8d2b47612e9de140a7e850.tar.bz2
Re-do of r16741 (http://codereview.chromium.org/113482).
Moved the new automation message in automation_messages_internal.h to the END of the enum as per the large scary warning that I skillfully missed last time around. TBR=amit Review URL: http://codereview.chromium.org/115711 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16754 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/automation/automation_constants.h4
-rw-r--r--chrome/test/automation/automation_messages_internal.h7
-rw-r--r--chrome/test/automation/automation_proxy.cc4
-rw-r--r--chrome/test/automation/automation_proxy.h4
4 files changed, 16 insertions, 3 deletions
diff --git a/chrome/test/automation/automation_constants.h b/chrome/test/automation/automation_constants.h
index 06d13e0..b08836d 100644
--- a/chrome/test/automation/automation_constants.h
+++ b/chrome/test/automation/automation_constants.h
@@ -6,8 +6,8 @@
#define CHROME_TEST_AUTOMATION_AUTOMATION_CONSTANTS_H__
namespace automation {
- // Amount of time to wait before querying the browser.
- static const int kSleepTime = 250;
+// Amount of time to wait before querying the browser.
+static const int kSleepTime = 250;
}
// Used by AutomationProxy, declared here so that other headers don't need
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index eaf5c4a..3922869 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -754,7 +754,7 @@ IPC_BEGIN_MESSAGES(Automation)
// A message for an external host.
IPC_MESSAGE_ROUTED4(AutomationMsg_ForwardMessageToExternalHost,
- int, // handle
+ int, /* handle */
std::string /* message */,
std::string /* origin */,
std::string /* target */)
@@ -921,5 +921,10 @@ IPC_BEGIN_MESSAGES(Automation)
IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_SetEnableExtensionAutomation,
bool /* true to enable extension automation */)
+ // This message tells the browser to start using the new proxy configuration
+ // represented by the given JSON string. The parameters used in the JSON
+ // string are defined in automation_constants.h.
+ IPC_SYNC_MESSAGE_ROUTED1_0(AutomationMsg_SetProxyConfig,
+ std::string /* proxy_config_json_string */)
IPC_END_MESSAGES(Automation)
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index 3f6508b..9fc8193 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -370,6 +370,10 @@ bool AutomationProxy::SetFilteredInet(bool enabled) {
return Send(new AutomationMsg_SetFilteredInet(0, enabled));
}
+bool AutomationProxy::SendProxyConfig(const std::string& new_proxy_config) {
+ return Send(new AutomationMsg_SetProxyConfig(0, new_proxy_config));
+}
+
void AutomationProxy::Disconnect() {
channel_.reset();
}
diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h
index 0b8ad57..75c76cd 100644
--- a/chrome/test/automation/automation_proxy.h
+++ b/chrome/test/automation/automation_proxy.h
@@ -145,6 +145,10 @@ class AutomationProxy : public IPC::Channel::Listener,
// false if the message fails to send to the browser.
bool SetFilteredInet(bool enabled);
+ // Sends the browser a new proxy configuration to start using. Returns true
+ // if the proxy config was successfully sent, false otherwise.
+ bool SendProxyConfig(const std::string& new_proxy_config);
+
// These methods are intended to be called by the background thread
// to signal that the given event has occurred, and that any corresponding
// Wait... function can return.