diff options
author | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 21:48:18 +0000 |
---|---|---|
committer | johnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-11 21:48:18 +0000 |
commit | 816633af02b2e7e2c5be5f760db60dee502f326b (patch) | |
tree | 461fba4349a961e90606c48bceeeafc46bea66f9 /chrome | |
parent | 6a3e3081b35adfdc055a32d7d7d2a91b5e31d09c (diff) | |
download | chromium_src-816633af02b2e7e2c5be5f760db60dee502f326b.zip chromium_src-816633af02b2e7e2c5be5f760db60dee502f326b.tar.gz chromium_src-816633af02b2e7e2c5be5f760db60dee502f326b.tar.bz2 |
Rename unused "SSL" related automation methods to be generic, since that's what these methods actually do, and so I can repurpose them for a different info-bar test.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/385029
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31718 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 18 | ||||
-rw-r--r-- | chrome/browser/automation/automation_provider.h | 14 | ||||
-rw-r--r-- | chrome/test/automation/automation_messages_internal.h | 12 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.cc | 11 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.h | 12 |
5 files changed, 33 insertions, 34 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 8df4ae4..e07b8e6 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -398,9 +398,9 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { HandleFindWindowLocationRequest) IPC_MESSAGE_HANDLER(AutomationMsg_BookmarkBarVisibility, GetBookmarkBarVisibility) - IPC_MESSAGE_HANDLER(AutomationMsg_GetSSLInfoBarCount, GetSSLInfoBarCount) - IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_ClickSSLInfoBarLink, - ClickSSLInfoBarLink) + IPC_MESSAGE_HANDLER(AutomationMsg_GetInfoBarCount, GetInfoBarCount) + IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_ClickInfoBarAccept, + ClickInfoBarAccept) IPC_MESSAGE_HANDLER(AutomationMsg_GetLastNavigationTime, GetLastNavigationTime) IPC_MESSAGE_HANDLER_DELAY_REPLY(AutomationMsg_WaitForNavigation, @@ -1799,7 +1799,7 @@ void TestingAutomationProvider::OnRemoveProvider() { AutomationProviderList::GetInstance()->RemoveProvider(this); } -void AutomationProvider::GetSSLInfoBarCount(int handle, int* count) { +void AutomationProvider::GetInfoBarCount(int handle, int* count) { *count = -1; // -1 means error. if (tab_tracker_->ContainsHandle(handle)) { NavigationController* nav_controller = tab_tracker_->GetResource(handle); @@ -1808,10 +1808,10 @@ void AutomationProvider::GetSSLInfoBarCount(int handle, int* count) { } } -void AutomationProvider::ClickSSLInfoBarLink(int handle, - int info_bar_index, - bool wait_for_navigation, - IPC::Message* reply_message) { +void AutomationProvider::ClickInfoBarAccept(int handle, + int info_bar_index, + bool wait_for_navigation, + IPC::Message* reply_message) { bool success = false; if (tab_tracker_->ContainsHandle(handle)) { NavigationController* nav_controller = tab_tracker_->GetResource(handle); @@ -1837,7 +1837,7 @@ void AutomationProvider::ClickSSLInfoBarLink(int handle, // TODO(phajdan.jr): investgate whether the reply param (currently // AUTOMATION_MSG_NAVIGATION_ERROR) should depend on success. if (!wait_for_navigation || !success) - AutomationMsg_ClickSSLInfoBarLink::WriteReplyParams( + AutomationMsg_ClickInfoBarAccept::WriteReplyParams( reply_message, AUTOMATION_MSG_NAVIGATION_ERROR); } diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 66e7de8..5b5ac29 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -413,15 +413,15 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, const std::string& origin, const std::string& target); - // Retrieves the number of SSL related info-bars currently showing in |count|. - void GetSSLInfoBarCount(int handle, int* count); + // Retrieves the number of info-bars currently showing in |count|. + void GetInfoBarCount(int handle, int* count); - // Causes a click on the link of the info-bar at |info_bar_index|. If - // |wait_for_navigation| is true, it sends the reply after a navigation has + // Causes a click on the "accept" button of the info-bar at |info_bar_index|. + // If |wait_for_navigation| is true, it sends the reply after a navigation has // occurred. - void ClickSSLInfoBarLink(int handle, int info_bar_index, - bool wait_for_navigation, - IPC::Message* reply_message); + void ClickInfoBarAccept(int handle, int info_bar_index, + bool wait_for_navigation, + IPC::Message* reply_message); // Retrieves the last time a navigation occurred for the tab. void GetLastNavigationTime(int handle, int64* last_navigation_time); diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h index d2f7458..754c335 100644 --- a/chrome/test/automation/automation_messages_internal.h +++ b/chrome/test/automation/automation_messages_internal.h @@ -773,16 +773,16 @@ IPC_BEGIN_MESSAGES(Automation) bool, /* is_visible */ bool /* still_animating */) - // This message requests the number of SSL related info bars opened. It + // This message requests the number of related info bars opened. It // returns -1 if an error occurred. - IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetSSLInfoBarCount, + IPC_SYNC_MESSAGE_ROUTED1_1(AutomationMsg_GetInfoBarCount, int /* tab_handle */, int /* info bar count */) - // This message triggers the action associated with the link in the info-bar - // at the specified index. If |wait for navigation| is true, it won't return - // until a navigation has occurred. - IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_ClickSSLInfoBarLink, + // This message triggers the action associated with the "accept" button in + // the info-bar at the specified index. If |wait for navigation| is true, it + // won't return until a navigation has occurred. + IPC_SYNC_MESSAGE_ROUTED3_1(AutomationMsg_ClickInfoBarAccept, int /* tab_handle */, int /* info bar index */, bool /* wait for navigation */, diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index 43246ea..c16044f 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -611,22 +611,21 @@ void TabProxy::HandleMessageFromExternalHost(const std::string& message, DCHECK(succeeded); } -bool TabProxy::GetSSLInfoBarCount(int* count) { +bool TabProxy::GetInfoBarCount(int* count) { if (!is_valid()) return false; - return sender_->Send(new AutomationMsg_GetSSLInfoBarCount(0, handle_, - count)); + return sender_->Send(new AutomationMsg_GetInfoBarCount(0, handle_, count)); } -bool TabProxy::ClickSSLInfoBarLink(int info_bar_index, - bool wait_for_navigation) { +bool TabProxy::ClickInfoBarAccept(int info_bar_index, + bool wait_for_navigation) { if (!is_valid()) return false; AutomationMsg_NavigationResponseValues result = AUTOMATION_MSG_NAVIGATION_ERROR; - sender_->Send(new AutomationMsg_ClickSSLInfoBarLink( + sender_->Send(new AutomationMsg_ClickInfoBarAccept( 0, handle_, info_bar_index, wait_for_navigation, &result)); return result == AUTOMATION_MSG_NAVIGATION_SUCCESS || result == AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED; diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index 7693e60..9a5be9c 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -315,13 +315,13 @@ class TabProxy : public AutomationResourceProxy { const std::string& origin, const std::string& target); - // Retrieves the number of SSL related info-bars currently showing in |count|. - bool GetSSLInfoBarCount(int* count); + // Retrieves the number of info-bars currently showing in |count|. + bool GetInfoBarCount(int* count); - // Causes a click on the link of the info-bar at |info_bar_index|. If - // |wait_for_navigation| is true, this call does not return until a navigation - // has occured. - bool ClickSSLInfoBarLink(int info_bar_index, bool wait_for_navigation); + // Causes a click on the "accept" button of the info-bar at |info_bar_index|. + // If |wait_for_navigation| is true, this call does not return until a + // navigation has occured. + bool ClickInfoBarAccept(int info_bar_index, bool wait_for_navigation); // Retrieves the time at which the last navigation occured. This is intended // to be used with WaitForNavigation (see below). |