summaryrefslogtreecommitdiffstats
path: root/chrome/browser/automation/automation_provider.h
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-11 12:42:51 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-05-11 12:42:51 +0000
commit5ea92a92e9fa26334db821da688d3c46e295d19c (patch)
treeac387512f3f23544d62c11c6e95669d5ca158dff /chrome/browser/automation/automation_provider.h
parentf4db3ef5fe811ed8668a05a7be740a9bb60374ac (diff)
downloadchromium_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/browser/automation/automation_provider.h')
-rw-r--r--chrome/browser/automation/automation_provider.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h
index 5662835..bf53b36 100644
--- a/chrome/browser/automation/automation_provider.h
+++ b/chrome/browser/automation/automation_provider.h
@@ -79,22 +79,21 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>,
// complete, the completed_response object is sent; if the server requires
// authentication, we instead send the auth_needed_response object. A pointer
// to the added navigation observer is returned. This object should NOT be
- // deleted and should be released by calling the corresponding
- // RemoveNavigationStatusListener method.
+ // deleted and should be released by calling the RemoveObserver method.
NotificationObserver* AddNavigationStatusListener(
NavigationController* tab, IPC::Message* reply_message,
int number_of_navigations, bool include_current_navigation);
- void RemoveNavigationStatusListener(NotificationObserver* obs);
-
// Add an observer for the TabStrip. Currently only Tab append is observed. A
// navigation listener is created on successful notification of tab append. A
// pointer to the added navigation observer is returned. This object should
- // NOT be deleted and should be released by calling the corresponding
- // RemoveTabStripObserver method.
+ // NOT be deleted and should be released by calling the RemoveObserver method.
NotificationObserver* AddTabStripObserver(Browser* parent,
IPC::Message* reply_message);
- void RemoveTabStripObserver(NotificationObserver* obs);
+
+ // Remove an observer. The |NotificationObserver| still needs to be deleted
+ // afterwards.
+ void RemoveObserver(NotificationObserver* obs);
// Get the index of a particular NavigationController object
// in the given parent window. This method uses
@@ -334,6 +333,11 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>,
int64 id,
bool* success);
+ // Wait for the download shelf to appear or disappear.
+ void WaitForDownloadShelfVisibilityChange(int browser_handle,
+ bool visibility,
+ IPC::Message* reply_message);
+
// Get info about downloads. This includes only ones that have been
// registered by the history system.
// Uses the JSON interface for input/output.