diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 22:54:03 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-22 22:54:03 +0000 |
commit | 2e39f625a1e09e2a1b29bb90e3a4aa1fee5829b1 (patch) | |
tree | 01c5246ff1483905cb1667a28ac116fe4559ab4b /chrome/browser/find_bar_host_browsertest.cc | |
parent | 7403d38f1a07efda20d3e6408a2edaf371da0007 (diff) | |
download | chromium_src-2e39f625a1e09e2a1b29bb90e3a4aa1fee5829b1.zip chromium_src-2e39f625a1e09e2a1b29bb90e3a4aa1fee5829b1.tar.gz chromium_src-2e39f625a1e09e2a1b29bb90e3a4aa1fee5829b1.tar.bz2 |
[Mac] Makes ctrl-return follow links when finding in page.
Enables the FindInPageControllerTest browser test on Mac.
BUG=38365,37808
TEST=Do a find in page for text in a link. Pressing ctrl-return while the findbar has focus should follow the link.
Review URL: http://codereview.chromium.org/1061003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42276 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/find_bar_host_browsertest.cc')
-rw-r--r-- | chrome/browser/find_bar_host_browsertest.cc | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/chrome/browser/find_bar_host_browsertest.cc b/chrome/browser/find_bar_host_browsertest.cc index 508e5c8..c6ff0d7 100644 --- a/chrome/browser/find_bar_host_browsertest.cc +++ b/chrome/browser/find_bar_host_browsertest.cc @@ -6,20 +6,23 @@ #include "base/message_loop.h" #include "chrome/browser/browser.h" #include "chrome/browser/browser_window.h" +#include "chrome/browser/find_bar.h" #include "chrome/browser/find_bar_controller.h" #include "chrome/browser/find_notification_details.h" #include "chrome/browser/renderer_host/render_view_host.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/browser/tab_contents/tab_contents_view.h" -#include "chrome/browser/views/find_bar_host.h" #include "chrome/common/notification_service.h" #include "chrome/test/in_process_browser_test.h" #include "chrome/test/ui_test_utils.h" #if defined(TOOLKIT_VIEWS) +#include "chrome/browser/views/find_bar_host.h" #include "views/focus/focus_manager.h" #elif defined(TOOLKIT_GTK) #include "chrome/browser/gtk/slide_animator_gtk.h" +#elif defined(OS_MACOSX) +#include "chrome/browser/cocoa/find_bar_bridge.h" #endif const std::wstring kSimplePage = L"404_is_enough_for_us.html"; @@ -54,6 +57,8 @@ class FindInPageControllerTest : public InProcessBrowserTest { DropdownBarHost::disable_animations_during_testing_ = true; #elif defined(TOOLKIT_GTK) SlideAnimatorGtk::SetAnimationsForTesting(false); +#elif defined(OS_MACOSX) + FindBarBridge::disable_animations_during_testing_ = true; #endif } @@ -495,23 +500,24 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) { browser()->ShowFindBar(); + gfx::Point position; bool fully_visible = false; // Make sure it is open. - EXPECT_TRUE(GetFindBarWindowInfo(NULL, &fully_visible)); + EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); EXPECT_TRUE(fully_visible); // Reload the tab and make sure Find window doesn't go away. browser()->Reload(); ui_test_utils::WaitForNavigationInCurrentTab(browser()); - EXPECT_TRUE(GetFindBarWindowInfo(NULL, &fully_visible)); + EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); EXPECT_TRUE(fully_visible); // Navigate and make sure the Find window goes away. ui_test_utils::NavigateToURL(browser(), url2); - EXPECT_TRUE(GetFindBarWindowInfo(NULL, &fully_visible)); + EXPECT_TRUE(GetFindBarWindowInfo(&position, &fully_visible)); EXPECT_FALSE(fully_visible); } @@ -556,8 +562,16 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, EXPECT_FALSE(fully_visible); } +// TODO(rohitrao): The FindMovesWhenObscuring test does not pass on mac. +// http://crbug.com/22036 +#if defined(OS_MACOSX) +#define MAYBE_FindMovesWhenObscuring DISABLED_FindMovesWhenObscuring +#else +#define MAYBE_FindMovesWhenObscuring FindMovesWhenObscuring +#endif + // Make sure Find box moves out of the way if it is obscuring the active match. -IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindMovesWhenObscuring) { +IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_FindMovesWhenObscuring) { HTTPTestServer* server = StartHTTPServer(); GURL url = server->TestServerPageW(kMoveIfOver); |