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

Unified Diff: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc

Issue 532143002: Close the find bar on reload. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit chnages done. Created 6 years, 3 months 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 | « chrome/browser/ui/find_bar/find_bar_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
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 865e9768f024d3d4a8a28e422e4c6531aee1799a..13fc6e0bf207c31463dd29b6bade391141e4b9c1 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -839,7 +839,9 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
EXPECT_EQ(1, ordinal);
}
-IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
+// Verify that the find bar is hidden on reload and navigation.
+IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
+ HideFindBarOnNavigateAndReload) {
// First we navigate to our special focus tracking page.
GURL url = GetURL(kSimple);
GURL url2 = GetURL(kFramePage);
@@ -854,7 +856,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible));
EXPECT_TRUE(fully_visible);
- // Reload the tab and make sure Find window doesn't go away.
+ // Reload and make sure the find window goes away.
content::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
@@ -862,11 +864,17 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
GetController()));
chrome::Reload(browser(), CURRENT_TAB);
observer.Wait();
+ EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible));
+ EXPECT_FALSE(fully_visible);
+ // Open the find bar again.
+ chrome::ShowFindBar(browser());
+
+ // Make sure it is open.
EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible));
EXPECT_TRUE(fully_visible);
- // Navigate and make sure the Find window goes away.
+ // Navigate and make sure the find window goes away.
ui_test_utils::NavigateToURL(browser(), url2);
EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible));
« no previous file with comments | « chrome/browser/ui/find_bar/find_bar_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698