summaryrefslogtreecommitdiffstats
path: root/chrome/browser/find_backend_unittest.cc
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 20:28:12 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-22 20:28:12 +0000
commite491f1cb8247090047bd8c895e9bd2bf4de5ee5a (patch)
treedf56a34ca44028d65cde514853cb3feda0c8b839 /chrome/browser/find_backend_unittest.cc
parent44c875a167d5ce78000d8843190a8c22d2236e54 (diff)
downloadchromium_src-e491f1cb8247090047bd8c895e9bd2bf4de5ee5a.zip
chromium_src-e491f1cb8247090047bd8c895e9bd2bf4de5ee5a.tar.gz
chromium_src-e491f1cb8247090047bd8c895e9bd2bf4de5ee5a.tar.bz2
Fix bug 12468 where F3 (FindNext) in a brand new tab was not using prepopulated search (what you have searched for in other tabs).
TEST=Covered by in-process-browser test now. To test manually: open a tab, search for something in FindInPage, Press Ctrl+T and then F3. It should search for the same thing in the newly opened tab. BUG=12468 Review URL: http://codereview.chromium.org/115714 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16786 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/find_backend_unittest.cc')
-rw-r--r--chrome/browser/find_backend_unittest.cc15
1 files changed, 9 insertions, 6 deletions
diff --git a/chrome/browser/find_backend_unittest.cc b/chrome/browser/find_backend_unittest.cc
index 3b2cdcc..4179cc2 100644
--- a/chrome/browser/find_backend_unittest.cc
+++ b/chrome/browser/find_backend_unittest.cc
@@ -27,8 +27,9 @@ TEST_F(FindBackendTest, InternalState) {
string16 search_term2 = L" but the economy ";
string16 search_term3 = L" eated it. ";
- // Start searching in the first TabContents.
- contents()->StartFinding(search_term1, true); // true=forward.
+ // Start searching in the first TabContents, searching forwards but not case
+ // sensitive (as indicated by the last two params).
+ contents()->StartFinding(search_term1, true, false);
// Pre-populate string should always match between the two, but find_text
// should not.
@@ -37,8 +38,9 @@ TEST_F(FindBackendTest, InternalState) {
EXPECT_EQ(search_term1, contents2.find_prepopulate_text());
EXPECT_EQ(string16(), contents2.find_text());
- // Now search in the other TabContents.
- contents2.StartFinding(search_term2, true); // true=forward.
+ // Now search in the other TabContents, searching forwards but not case
+ // sensitive (as indicated by the last two params).
+ contents2.StartFinding(search_term2, true, false);
// Again, pre-populate string should always match between the two, but
// find_text should not.
@@ -47,8 +49,9 @@ TEST_F(FindBackendTest, InternalState) {
EXPECT_EQ(search_term2, contents2.find_prepopulate_text());
EXPECT_EQ(search_term2, contents2.find_text());
- // Search again in the first TabContents.
- contents()->StartFinding(search_term3, true); // true=forward.
+ // Search again in the first TabContents, searching forwards but not case
+ // sensitive (as indicated by the last two params).
+ contents()->StartFinding(search_term3, true, false);
// Once more, pre-populate string should always match between the two, but
// find_text should not.