summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation
diff options
context:
space:
mode:
authorhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-16 02:46:33 +0000
committerhuanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-04-16 02:46:33 +0000
commit4f6381eea783e82117fd2b68f2a5a2945edc8e4b (patch)
tree6f6b10aa55297286cc1ffad490d7e8ceee0adee0 /chrome/test/automation
parentb68d5ed3f9d1b49b24713431bfe212b7601b75b1 (diff)
downloadchromium_src-4f6381eea783e82117fd2b68f2a5a2945edc8e4b.zip
chromium_src-4f6381eea783e82117fd2b68f2a5a2945edc8e4b.tar.gz
chromium_src-4f6381eea783e82117fd2b68f2a5a2945edc8e4b.tar.bz2
Consolidate ApplyAccelerator and RunCommand code
paths which do the same thing. - On browser side, remove AutomationMsg_ApplyAccelerator IPC message and ApplyAccelerator function in automation_provider. - On client side, let ApplyAccelerator simply call RunCommandAsync. With the change, converting all commands to synchronous mode should benefit both. Review URL: http://codereview.chromium.org/67152 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation')
-rw-r--r--chrome/test/automation/browser_proxy.cc6
-rw-r--r--chrome/test/automation/browser_proxy.h1
2 files changed, 2 insertions, 5 deletions
diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc
index 4a7846e..8757a5a 100644
--- a/chrome/test/automation/browser_proxy.cc
+++ b/chrome/test/automation/browser_proxy.cc
@@ -165,11 +165,7 @@ bool BrowserProxy::GetTabCountWithTimeout(int* num_tabs, uint32 timeout_ms,
}
bool BrowserProxy::ApplyAccelerator(int id) {
- if (!is_valid())
- return false;
-
- return sender_->Send(
- new AutomationMsg_ApplyAccelerator(0, handle_, id));
+ return RunCommandAsync(id);
}
#if defined(OS_WIN)
diff --git a/chrome/test/automation/browser_proxy.h b/chrome/test/automation/browser_proxy.h
index 4c6884a..1e3508b 100644
--- a/chrome/test/automation/browser_proxy.h
+++ b/chrome/test/automation/browser_proxy.h
@@ -112,6 +112,7 @@ class BrowserProxy : public AutomationResourceProxy {
// Apply the accelerator with given id (IDC_BACK, IDC_NEWTAB ...)
+ // The list can be found at chrome/app/chrome_dll_resource.h
// Returns true if the call was successful.
//
// The alternate way to test the accelerators is to use the Windows messaging