diff options
author | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-27 03:05:56 +0000 |
---|---|---|
committer | huanr@chromium.org <huanr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-27 03:05:56 +0000 |
commit | 56e71b7c8d857ed8c05336c370fe4cf95d10f973 (patch) | |
tree | 4c4748da6b2780b6d26443b78b3bd53dc577b13c /chrome/test/automation/browser_proxy.cc | |
parent | 768336c46a3740caa5716e4a6edcf6e7c03d1d9b (diff) | |
download | chromium_src-56e71b7c8d857ed8c05336c370fe4cf95d10f973.zip chromium_src-56e71b7c8d857ed8c05336c370fe4cf95d10f973.tar.gz chromium_src-56e71b7c8d857ed8c05336c370fe4cf95d10f973.tar.bz2 |
This check in is the initial step to try improve UI
automation framework. Currently we are not consistent in
UI automation. After receiving the automation message,
the automation provider in browser does not always
execute UI commands synchronously. In many cases, it
simply sends back an acknowledgement and dispatches
the command. On the test client side, it waits and
polls the result after sending the message.
I think this causes lots of UI test flakeyness and makes
the test slow. I plan to convert all asynchronous
execution to synchronous. It may take some time to get
them all done. I CC'ed a few people so they are aware of
this ongoing work. Feel free to comment on whether and
how to address the issue.
This check in adds an UI automation message
AutomationMsg_WindowExecuteCommandSync that executes
accelerators synchronously. The existing automation
message AutomationMsg_WindowExecuteCommand only
dispatches the accelerator.
There are many UI accelerators using the existing async
version. In this check in I only made the conversion
for IDC_NEW_TAB to try out the new mechanism.
Review URL: http://codereview.chromium.org/53108
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12632 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/automation/browser_proxy.cc')
-rw-r--r-- | chrome/test/automation/browser_proxy.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/test/automation/browser_proxy.cc b/chrome/test/automation/browser_proxy.cc index 942919d..9340a61 100644 --- a/chrome/test/automation/browser_proxy.cc +++ b/chrome/test/automation/browser_proxy.cc @@ -312,6 +312,19 @@ bool BrowserProxy::RunCommand(int browser_command) const { return result; } +bool BrowserProxy::RunCommandSync(int browser_command) const { + if (!is_valid()) + return false; + + bool result = false; + + sender_->Send(new AutomationMsg_WindowExecuteCommandSync(0, handle_, + browser_command, + &result)); + + return result; +} + bool BrowserProxy::GetBookmarkBarVisibility(bool* is_visible, bool* is_animating) { if (!is_valid()) |