Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2562)

Unified Diff: chrome/browser/views/find_bar_win_uitest.cc

Issue 14130: Add a ui test to make sure the Find box does not go away on Reload but does... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/test/ui/ui_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/find_bar_win_uitest.cc
===================================================================
--- chrome/browser/views/find_bar_win_uitest.cc (revision 6698)
+++ chrome/browser/views/find_bar_win_uitest.cc (working copy)
@@ -260,7 +260,7 @@
// Open the Find window and wait for it to animate.
EXPECT_TRUE(tabA->OpenFindInPage());
- EXPECT_TRUE(WaitForFindWindowFullyVisible(tabA.get()));
+ EXPECT_TRUE(WaitForFindWindowVisibilityChange(tabA.get(), true));
// Find its location.
int x = -1, y = -1;
@@ -300,3 +300,28 @@
EXPECT_EQ(x, new_x);
EXPECT_EQ(y, new_y);
}
+
+// Make sure Find box disappears on Navigate but not on Refresh.
+TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
+ TestServer server(L"chrome/test/data");
+
+ GURL url = server.TestServerPageW(kUserSelectPage);
+ scoped_ptr<TabProxy> tab(GetActiveTab());
+ ASSERT_TRUE(tab->NavigateToURL(url));
+ WaitUntilTabCount(1);
+
+ scoped_ptr<BrowserProxy> browser(automation()->GetBrowserWindow(0));
+ ASSERT_TRUE(browser.get() != NULL);
+
+ // Open the Find window and wait for it to animate.
+ EXPECT_TRUE(tab->OpenFindInPage());
+ EXPECT_TRUE(WaitForFindWindowVisibilityChange(tab.get(), true));
+
+ // Reload the tab and make sure Find box doesn't go away.
+ EXPECT_TRUE(tab->Reload());
+ EXPECT_TRUE(WaitForFindWindowVisibilityChange(tab.get(), true));
+
+ // Navigate and make sure the Find box goes away.
+ EXPECT_TRUE(tab->NavigateToURL(url));
+ EXPECT_TRUE(WaitForFindWindowVisibilityChange(tab.get(), false));
+}
« no previous file with comments | « no previous file | chrome/test/ui/ui_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698