diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-05 17:08:07 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-05 17:08:07 +0000 |
commit | 726bdbd79ab870b8f2d1b37ba72895cb68447a14 (patch) | |
tree | 0d7504dc32dff8f2cd48c9973a1bc9f41518787d /chrome/browser/find_bar.h | |
parent | 1456dad368c8998eaee08a30965c41ae55a32274 (diff) | |
download | chromium_src-726bdbd79ab870b8f2d1b37ba72895cb68447a14.zip chromium_src-726bdbd79ab870b8f2d1b37ba72895cb68447a14.tar.gz chromium_src-726bdbd79ab870b8f2d1b37ba72895cb68447a14.tar.bz2 |
Fix prepopulate value for Find and add browser tests for it.
Notable changes:
FindBarController now sets the prepopulate text during Show for the Find dialog, to fix regression 40121. It also checks not just the current find string (find_text()) but the previous one also (previous_find_text()) in MaybeSetPrepopulateText() because the current find string is blanked out when closing the Find window. And TabContents now makes sure previous_find_text() is never overwritten with an empty find_text value (to prevent the last search from being cleared if you open Find, close it without searching and open it again).
This changelist also adds automated tests for the codepaths above, which results in adding a GetFindText method to the FindBarTesting interface, to allow the tests to check what string is being shown to the user when the Find box opens.
BUG=40121
TEST=FindInPageControllerTest.Prepopulate* (three tests)
Review URL: http://codereview.chromium.org/1560012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43620 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/find_bar.h')
-rw-r--r-- | chrome/browser/find_bar.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome/browser/find_bar.h b/chrome/browser/find_bar.h index 7797387..e95e8a1 100644 --- a/chrome/browser/find_bar.h +++ b/chrome/browser/find_bar.h @@ -1,4 +1,4 @@ -// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -87,6 +87,9 @@ class FindBarTesting { // shown (return value of false), the out params will be {(0, 0), false}. virtual bool GetFindBarWindowInfo(gfx::Point* position, bool* fully_visible) = 0; + + // Gets the search string currently visible in the Find box. + virtual string16 GetFindText() = 0; }; #endif // CHROME_BROWSER_FIND_BAR_H_ |