diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-05 21:36:57 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-05 21:36:57 +0000 |
commit | c2cbeb9dd8aec543d5c6f0fe2aa99c1f8c655351 (patch) | |
tree | 6f71cefde95cc33d0f656917a48df2466f8c655a /chrome/browser/automation | |
parent | 970556302b1ea50d4fc680d3656269cd50f6cf08 (diff) | |
download | chromium_src-c2cbeb9dd8aec543d5c6f0fe2aa99c1f8c655351.zip chromium_src-c2cbeb9dd8aec543d5c6f0fe2aa99c1f8c655351.tar.gz chromium_src-c2cbeb9dd8aec543d5c6f0fe2aa99c1f8c655351.tar.bz2 |
Readding UI test I pulled yesterday; hopefully the bots will like it more now. I need to wait for the bookmark bar to become visible so I plumbed in similar code as for the Find box instead of using Sleep's.
Review URL: http://codereview.chromium.org/473
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1809 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/automation')
-rw-r--r-- | chrome/browser/automation/automation_provider.cc | 24 | ||||
-rw-r--r-- | chrome/browser/automation/automation_provider.h | 3 |
2 files changed, 27 insertions, 0 deletions
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc index 5158c80..b831a71 100644 --- a/chrome/browser/automation/automation_provider.cc +++ b/chrome/browser/automation/automation_provider.cc @@ -23,6 +23,7 @@ #include "chrome/browser/save_package.h" #include "chrome/browser/ssl_blocking_page.h" #include "chrome/browser/web_contents.h" +#include "chrome/browser/views/bookmark_bar_view.h" #include "chrome/browser/views/location_bar_view.h" #include "chrome/common/chrome_paths.h" #include "chrome/test/automation/automation_messages.h" @@ -755,6 +756,8 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { GetFindWindowVisibility) IPC_MESSAGE_HANDLER(AutomationMsg_FindWindowLocationRequest, HandleFindWindowLocationRequest) + IPC_MESSAGE_HANDLER(AutomationMsg_BookmarkBarVisibilityRequest, + GetBookmarkBarVisitility) IPC_END_MESSAGE_MAP() } @@ -1720,6 +1723,27 @@ void AutomationProvider::HandleFindWindowLocationRequest( x, y)); } +void AutomationProvider::GetBookmarkBarVisitility(const IPC::Message& message, + int handle) { + bool visible = false; + bool animating = false; + + void* iter = NULL; + if (browser_tracker_->ContainsHandle(handle)) { + Browser* browser = browser_tracker_->GetResource(handle); + if (browser) { + BookmarkBarView* bookmark_bar = browser->window()->GetBookmarkBarView(); + if (bookmark_bar) { + animating = bookmark_bar->IsAnimating(); + visible = browser->window()->IsBookmarkBarVisible(); + } + } + } + + Send(new AutomationMsg_BookmarkBarVisibilityResponse(message.routing_id(), + visible, animating)); +} + void AutomationProvider::HandleInspectElementRequest( const IPC::Message& message, int handle, int x, int y) { WebContents* web_contents = GetWebContentsForHandle(handle, NULL); diff --git a/chrome/browser/automation/automation_provider.h b/chrome/browser/automation/automation_provider.h index 370eeb3..674565c 100644 --- a/chrome/browser/automation/automation_provider.h +++ b/chrome/browser/automation/automation_provider.h @@ -208,6 +208,9 @@ class AutomationProvider : public base::RefCounted<AutomationProvider>, // Responds to requests to find the location of the Find window. void HandleFindWindowLocationRequest(const IPC::Message& message, int handle); + // Get the visibility state of the Bookmark bar. + void GetBookmarkBarVisitility(const IPC::Message& message, int handle); + // Responds to InspectElement request void HandleInspectElementRequest(const IPC::Message& message, int handle, |