OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/message_loop.h" | 5 #include "base/message_loop.h" |
6 #include "base/string_util.h" | 6 #include "base/string_util.h" |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/renderer_host/render_view_host.h" | 9 #include "chrome/browser/renderer_host/render_view_host.h" |
10 #include "chrome/browser/tab_contents/tab_contents.h" | 10 #include "chrome/browser/tab_contents/tab_contents.h" |
11 #include "chrome/browser/tab_contents/tab_contents_view.h" | 11 #include "chrome/browser/tab_contents/tab_contents_view.h" |
12 #include "chrome/browser/tabs/tab_strip_model.h" | 12 #include "chrome/browser/tabs/tab_strip_model.h" |
13 #include "chrome/browser/ui/browser.h" | 13 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_navigator.h" | 14 #include "chrome/browser/ui/browser_navigator.h" |
15 #include "chrome/browser/ui/browser_window.h" | 15 #include "chrome/browser/ui/browser_window.h" |
16 #include "chrome/browser/ui/find_bar/find_bar.h" | 16 #include "chrome/browser/ui/find_bar/find_bar.h" |
17 #include "chrome/browser/ui/find_bar/find_bar_controller.h" | 17 #include "chrome/browser/ui/find_bar/find_bar_controller.h" |
18 #include "chrome/browser/ui/find_bar/find_notification_details.h" | 18 #include "chrome/browser/ui/find_bar/find_notification_details.h" |
19 #include "chrome/test/in_process_browser_test.h" | 19 #include "chrome/test/in_process_browser_test.h" |
20 #include "chrome/test/ui_test_utils.h" | 20 #include "chrome/test/ui_test_utils.h" |
21 #include "net/test/test_server.h" | 21 #include "net/test/test_server.h" |
22 #include "ui/base/keycodes/keyboard_codes.h" | 22 #include "ui/base/keycodes/keyboard_codes.h" |
23 | 23 |
24 #if defined(TOOLKIT_VIEWS) | 24 #if defined(TOOLKIT_VIEWS) |
25 #include "chrome/browser/ui/views/find_bar_host.h" | 25 #include "chrome/browser/ui/views/find_bar_host.h" |
26 #include "views/focus/focus_manager.h" | 26 #include "views/focus/focus_manager.h" |
27 #elif defined(TOOLKIT_GTK) | 27 #elif defined(TOOLKIT_GTK) |
28 #include "chrome/browser/gtk/slide_animator_gtk.h" | 28 #include "chrome/browser/gtk/slide_animator_gtk.h" |
29 #elif defined(OS_MACOSX) | 29 #elif defined(OS_MACOSX) |
30 #include "chrome/browser/ui/cocoa/find_bar_bridge.h" | 30 #include "chrome/browser/ui/cocoa/find_bar/find_bar_bridge.h" |
31 #endif | 31 #endif |
32 | 32 |
33 const std::string kSimplePage = "404_is_enough_for_us.html"; | 33 const std::string kSimplePage = "404_is_enough_for_us.html"; |
34 const std::string kFramePage = "files/find_in_page/frames.html"; | 34 const std::string kFramePage = "files/find_in_page/frames.html"; |
35 const std::string kFrameData = "files/find_in_page/framedata_general.html"; | 35 const std::string kFrameData = "files/find_in_page/framedata_general.html"; |
36 const std::string kUserSelectPage = "files/find_in_page/user-select.html"; | 36 const std::string kUserSelectPage = "files/find_in_page/user-select.html"; |
37 const std::string kCrashPage = "files/find_in_page/crash_1341577.html"; | 37 const std::string kCrashPage = "files/find_in_page/crash_1341577.html"; |
38 const std::string kTooFewMatchesPage = "files/find_in_page/bug_1155639.html"; | 38 const std::string kTooFewMatchesPage = "files/find_in_page/bug_1155639.html"; |
39 const std::string kEndState = "files/find_in_page/end_state.html"; | 39 const std::string kEndState = "files/find_in_page/end_state.html"; |
40 const std::string kPrematureEnd = "files/find_in_page/premature_end.html"; | 40 const std::string kPrematureEnd = "files/find_in_page/premature_end.html"; |
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1079 | 1079 |
1080 TabContents* tab = browser()->GetSelectedTabContents(); | 1080 TabContents* tab = browser()->GetSelectedTabContents(); |
1081 int ordinal = 0; | 1081 int ordinal = 0; |
1082 FindInPageWchar(tab, L"link", kFwd, kIgnoreCase, &ordinal); | 1082 FindInPageWchar(tab, L"link", kFwd, kIgnoreCase, &ordinal); |
1083 EXPECT_EQ(ordinal, 1); | 1083 EXPECT_EQ(ordinal, 1); |
1084 | 1084 |
1085 // End the find session, click on the link. | 1085 // End the find session, click on the link. |
1086 tab->StopFinding(FindBarController::kActivateSelection); | 1086 tab->StopFinding(FindBarController::kActivateSelection); |
1087 EXPECT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); | 1087 EXPECT_TRUE(ui_test_utils::WaitForNavigationInCurrentTab(browser())); |
1088 } | 1088 } |
OLD | NEW |