diff options
author | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 18:45:45 +0000 |
---|---|---|
committer | finnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-26 18:45:45 +0000 |
commit | d0033329c98edaf3fff226aabe8f5adc7aa10c62 (patch) | |
tree | c9f400c195784b778ca8dc24a945abcf91a4ec5c /chrome/browser/views/find_bar_win.cc | |
parent | d53b4ad91e57d3cf64c3188a89843242c75347aa (diff) | |
download | chromium_src-d0033329c98edaf3fff226aabe8f5adc7aa10c62.zip chromium_src-d0033329c98edaf3fff226aabe8f5adc7aa10c62.tar.gz chromium_src-d0033329c98edaf3fff226aabe8f5adc7aa10c62.tar.bz2 |
Fix 8063: Find-in-page remains open on History/Downloads page.
Added a UI test to catch this in the future. Also, in some of the UI tests I added a generic URL for pages that don't care about the content of the page and are just testing visibility of the Find box, etc.
TEST=Covered by tests already.
BUG=8063
Review URL: http://codereview.chromium.org/28162
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10490 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/find_bar_win.cc')
-rw-r--r-- | chrome/browser/views/find_bar_win.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/chrome/browser/views/find_bar_win.cc b/chrome/browser/views/find_bar_win.cc index 8c4cce9..dd9056c 100644 --- a/chrome/browser/views/find_bar_win.cc +++ b/chrome/browser/views/find_bar_win.cc @@ -225,10 +225,12 @@ void FindBarWin::ChangeWebContents(WebContents* contents) { web_contents_ = contents; - if (web_contents_) { - if (IsVisible() && web_contents_ && !web_contents_->find_ui_active()) - ShowWindow(SW_HIDE); + // Hide any visible find window from the previous tab if NULL |web_contents| + // is passed in or if the find UI is not active in the new tab. + if (IsVisible() && (!web_contents_ || !web_contents_->find_ui_active())) + ShowWindow(SW_HIDE); + if (web_contents_) { NotificationService::current()->AddObserver( this, NotificationType::FIND_RESULT_AVAILABLE, Source<TabContents>(web_contents_)); |