diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 12:42:51 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-11 12:42:51 +0000 |
commit | 5ea92a92e9fa26334db821da688d3c46e295d19c (patch) | |
tree | ac387512f3f23544d62c11c6e95669d5ca158dff /chrome/test/automation/browser_proxy.cc | |
parent | f4db3ef5fe811ed8668a05a7be740a9bb60374ac (diff) | |
download | chromium_src-5ea92a92e9fa26334db821da688d3c46e295d19c.zip chromium_src-5ea92a92e9fa26334db821da688d3c46e295d19c.tar.gz chromium_src-5ea92a92e9fa26334db821da688d3c46e295d19c.tar.bz2 |
Reland r46681: Use IPC to wait for download in DownloadTest.
Add AutomationMsg_WaitForDownloadShelfVisibilityChange and use it in UITestBase for the download tests.
This should decrease flakiness of download tests.
TEST=DownloadTest.*, especially DownloadTest.[Dont]CloseNewTab*
BUG=43066
Review URL: http://codereview.chromium.org/2051002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46909 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 1b275d8..6456cec 100644 --- a/chrome/test/automation/browser_proxy.cc +++ b/chrome/test/automation/browser_proxy.cc @@ -398,6 +398,19 @@ bool BrowserProxy::SetShelfVisible(bool is_visible) { is_visible)); } +bool BrowserProxy::WaitForDownloadShelfVisibilityChange(bool visibility) { + if (!is_valid()) + return false; + + bool result = false; + + if (!sender_->Send(new AutomationMsg_WaitForDownloadShelfVisibilityChange( + 0, handle_, visibility, &result))) + return false; + + return result; +} + bool BrowserProxy::SetIntPreference(const std::wstring& name, int value) { if (!is_valid()) return false; |