summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/find_bar_bridge.mm
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-05 17:08:07 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-05 17:08:07 +0000
commit726bdbd79ab870b8f2d1b37ba72895cb68447a14 (patch)
tree0d7504dc32dff8f2cd48c9973a1bc9f41518787d /chrome/browser/cocoa/find_bar_bridge.mm
parent1456dad368c8998eaee08a30965c41ae55a32274 (diff)
downloadchromium_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/cocoa/find_bar_bridge.mm')
-rw-r--r--chrome/browser/cocoa/find_bar_bridge.mm9
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/find_bar_bridge.mm b/chrome/browser/cocoa/find_bar_bridge.mm
index 7b46fd2..299a17b 100644
--- a/chrome/browser/cocoa/find_bar_bridge.mm
+++ b/chrome/browser/cocoa/find_bar_bridge.mm
@@ -83,3 +83,12 @@ bool FindBarBridge::GetFindBarWindowInfo(gfx::Point* position,
return window_visible;
}
+
+string16 FindBarBridge::GetFindText() {
+ // This function is currently only used in Windows and Linux specific browser
+ // tests (testing prepopulate values that Mac's don't rely on), but if we add
+ // more tests that are non-platform specific, we need to flesh out this
+ // function.
+ NOTIMPLEMENTED();
+ return string16();
+}