summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-19 17:26:37 +0000
committerfinnur@google.com <finnur@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-19 17:26:37 +0000
commit1692a966a15bfce0bcf9a21b548d8bdb46edcfc2 (patch)
tree384de63043c0a35b4d330b2b8da322039ab231fc /chrome/browser
parent88ae1403f74c34e171f80b1533a38f7d5a8abf4f (diff)
downloadchromium_src-1692a966a15bfce0bcf9a21b548d8bdb46edcfc2.zip
chromium_src-1692a966a15bfce0bcf9a21b548d8bdb46edcfc2.tar.gz
chromium_src-1692a966a15bfce0bcf9a21b548d8bdb46edcfc2.tar.bz2
Attempt at fixing flaky Find test.
The waterfall (build.chromium.org) has been complaining about this test for a while now. Nicolas and I looked at this, but we don't see anything wrong. We theorized this is because we issue Find right after the navigation and maybe the tab isn't ready. We'll see what happens with this change. Review URL: http://codereview.chromium.org/2978 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2411 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/find_in_page_controller_uitest.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/find_in_page_controller_uitest.cc b/chrome/browser/find_in_page_controller_uitest.cc
index f26afa9..852248b 100644
--- a/chrome/browser/find_in_page_controller_uitest.cc
+++ b/chrome/browser/find_in_page_controller_uitest.cc
@@ -30,6 +30,7 @@ TEST_F(FindInPageControllerTest, FindInPageFrames) {
GURL url = server.TestServerPageW(kFramePage);
scoped_ptr<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab->NavigateToURL(url));
+ WaitUntilTabCount(1);
// Try incremental search (mimicking user typing in).
EXPECT_EQ(18, tab->FindInPage(L"g", FWD, IGNORE_CASE, false));
@@ -75,6 +76,7 @@ TEST_F(FindInPageControllerTest, FindUnSelectableText) {
GURL url = server.TestServerPageW(kUserSelectPage);
scoped_ptr<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab->NavigateToURL(url));
+ WaitUntilTabCount(1);
EXPECT_EQ(0, tab->FindInPage(L"text", FWD, IGNORE_CASE, false));
EXPECT_EQ(0, tab->FindInPage(L"Non-existing string", FWD, IGNORE_CASE,
@@ -88,6 +90,7 @@ TEST_F(FindInPageControllerTest, DISABLED_FindCrash_Issue1341577) {
GURL url = server.TestServerPageW(kCrashPage);
scoped_ptr<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab->NavigateToURL(url));
+ WaitUntilTabCount(1);
// This would crash the tab. These must be the first two find requests issued
// against the frame, otherwise an active frame pointer is set and it wont
@@ -108,12 +111,13 @@ TEST_F(FindInPageControllerTest, DISABLED_FindCrash_Issue1341577) {
// 3) It takes longer than the time-slice given to each Find operation (100
// ms) to find one or more of those matches (so Find times out and has to try
// again from where it left off).
-TEST_F(FindInPageControllerTest, FindEnoughMatches_Issue1341577) {
+TEST_F(FindInPageControllerTest, FindEnoughMatches_Issue1155639) {
TestServer server(L"chrome/test/data");
GURL url = server.TestServerPageW(kTooFewMatchesPage);
scoped_ptr<TabProxy> tab(GetActiveTab());
ASSERT_TRUE(tab->NavigateToURL(url));
+ WaitUntilTabCount(1);
// This string appears 5 times at the bottom of a long page. If Find restarts
// properly after a timeout, it will find 5 matches, not just 1.
@@ -128,6 +132,7 @@ TEST_F(FindInPageControllerTest, FindMovesOnTabClose_Issue1343052) {
GURL url = server.TestServerPageW(kFramePage);
scoped_ptr<TabProxy> tabA(GetActiveTab());
ASSERT_TRUE(tabA->NavigateToURL(url));
+ WaitUntilTabCount(1);
scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
ASSERT_TRUE(browser.get() != NULL);