diff options
author | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-03 14:24:48 +0000 |
---|---|---|
committer | finnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-02-03 14:24:48 +0000 |
commit | 591220ed0f0bb49f3ad8f38cc368016adf0be8db (patch) | |
tree | 5f475078aedca5de8ae78135dad5c10a42ac9b8a /chrome/browser/ui/find_bar | |
parent | ab21e583480407e8ca790361be1b0cad94612ecf (diff) | |
download | chromium_src-591220ed0f0bb49f3ad8f38cc368016adf0be8db.zip chromium_src-591220ed0f0bb49f3ad8f38cc368016adf0be8db.tar.gz chromium_src-591220ed0f0bb49f3ad8f38cc368016adf0be8db.tar.bz2 |
Add a regression test for issue 70505.
(2nd try, with fix for TabContents cleanup reorg fix)
TBR=ojan
BUG=70505
TEST=Automated test added, see bug for details.
Review URL: http://codereview.chromium.org/6250127
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73618 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/find_bar')
-rw-r--r-- | chrome/browser/ui/find_bar/find_bar_host_browsertest.cc | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc index a96b9c4..5329bda 100644 --- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc +++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc @@ -38,6 +38,7 @@ const std::string kFrameData = "files/find_in_page/framedata_general.html"; const std::string kUserSelectPage = "files/find_in_page/user-select.html"; const std::string kCrashPage = "files/find_in_page/crash_1341577.html"; const std::string kTooFewMatchesPage = "files/find_in_page/bug_1155639.html"; +const std::string kLongTextareaPage = "files/find_in_page/large_textarea.html"; const std::string kEndState = "files/find_in_page/end_state.html"; const std::string kPrematureEnd = "files/find_in_page/premature_end.html"; const std::string kMoveIfOver = "files/find_in_page/move_if_obscuring.html"; @@ -515,6 +516,25 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindRestarts_Issue1155639) { EXPECT_EQ(1, ordinal); } +// Make sure we don't get into an infinite loop when text box contains very +// large amount of text. +IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindRestarts_Issue70505) { + ASSERT_TRUE(test_server()->Start()); + + // First we navigate to our page. + GURL url = test_server()->GetURL(kLongTextareaPage); + ui_test_utils::NavigateToURL(browser(), url); + + // If this test hangs on the FindInPage call, then it might be a regression + // such as the one found in issue http://crbug.com/70505. + int ordinal = 0; + FindInPageWchar(browser()->GetSelectedTabContentsWrapper(), + L"a", kFwd, kIgnoreCase, &ordinal); + EXPECT_EQ(1, ordinal); + // TODO(finnur): We cannot reliably get the matchcount for this Find call + // until we fix issue http://crbug.com/71176. +} + // This tests bug 11761: FindInPage terminates search prematurely. // This test is not expected to pass until bug 11761 is fixed. IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, |