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

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: changes as per reviewers comments. 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
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..1917573d788bd15dc4c24fbb54fea0385659ba4d 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,10 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
EXPECT_EQ(1, ordinal);
}
-IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
+// This test will verify that the Find bar should disappear
msw 2014/09/08 18:16:55 nit: consider: "Verify that the find bar is hidden
Deepak 2014/09/09 03:56:06 Done.
+// on reload and on navigation.
+IN_PROC_BROWSER_TEST_F(FindInPageControllerTest,
+ FindDisappearOnNavigateAndReload) {
msw 2014/09/08 18:16:55 nit: HideFindOnNavigateAndReload fits on the line
Deepak 2014/09/09 03:56:06 Done.
// First we navigate to our special focus tracking page.
GURL url = GetURL(kSimple);
GURL url2 = GetURL(kFramePage);
@@ -854,7 +857,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.
msw 2014/09/08 18:16:55 nit: s/Find/find
Deepak 2014/09/09 03:56:06 Done.
content::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
@@ -862,7 +865,13 @@ 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);
+ // Opening Findbar again.
msw 2014/09/08 18:16:55 nit: "Open the find bar again." Or remove this sup
Deepak 2014/09/09 03:56:06 Done.
msw 2014/09/09 04:25:03 You missed this nit; the comment should read. "Ope
+ chrome::ShowFindBar(browser());
+
+ // Make sure it is open.
EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible));
EXPECT_TRUE(fully_visible);

Powered by Google App Engine
This is Rietveld 408576698