OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "base/keyboard_codes.h" | 5 #include "base/keyboard_codes.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "chrome/browser/browser.h" | 7 #include "chrome/browser/browser.h" |
8 #include "chrome/browser/browser_window.h" | 8 #include "chrome/browser/browser_window.h" |
9 #include "chrome/browser/find_bar.h" | 9 #include "chrome/browser/find_bar.h" |
10 #include "chrome/browser/find_bar_controller.h" | 10 #include "chrome/browser/find_bar_controller.h" |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 browser()->ShowFindBar(); | 541 browser()->ShowFindBar(); |
542 | 542 |
543 gfx::Point position; | 543 gfx::Point position; |
544 bool fully_visible = false; | 544 bool fully_visible = false; |
545 | 545 |
546 // Make sure it is open. | 546 // Make sure it is open. |
547 EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); | 547 EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); |
548 EXPECT_TRUE(fully_visible); | 548 EXPECT_TRUE(fully_visible); |
549 | 549 |
550 // Reload the tab and make sure Find window doesn't go away. | 550 // Reload the tab and make sure Find window doesn't go away. |
551 browser()->Reload(); | 551 browser()->Reload(CURRENT_TAB); |
552 ui_test_utils::WaitForNavigationInCurrentTab(browser()); | 552 ui_test_utils::WaitForNavigationInCurrentTab(browser()); |
553 | 553 |
554 EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); | 554 EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); |
555 EXPECT_TRUE(fully_visible); | 555 EXPECT_TRUE(fully_visible); |
556 | 556 |
557 // Navigate and make sure the Find window goes away. | 557 // Navigate and make sure the Find window goes away. |
558 ui_test_utils::NavigateToURL(browser(), url2); | 558 ui_test_utils::NavigateToURL(browser(), url2); |
559 | 559 |
560 EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); | 560 EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); |
561 EXPECT_FALSE(fully_visible); | 561 EXPECT_FALSE(fully_visible); |
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1081 | 1081 |
1082 TabContents* tab = browser()->GetSelectedTabContents(); | 1082 TabContents* tab = browser()->GetSelectedTabContents(); |
1083 int ordinal = 0; | 1083 int ordinal = 0; |
1084 FindInPageWchar(tab, L"link", kFwd, kIgnoreCase, &ordinal); | 1084 FindInPageWchar(tab, L"link", kFwd, kIgnoreCase, &ordinal); |
1085 EXPECT_EQ(ordinal, 1); | 1085 EXPECT_EQ(ordinal, 1); |
1086 | 1086 |
1087 // End the find session, click on the link. | 1087 // End the find session, click on the link. |
1088 tab->StopFinding(FindBarController::kActivateSelection); | 1088 tab->StopFinding(FindBarController::kActivateSelection); |
1089 EXPECT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); | 1089 EXPECT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); |
1090 } | 1090 } |
OLD | NEW |