OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/string16.h" | 6 #include "base/string16.h" |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 const bool kFwd = true; | 63 const bool kFwd = true; |
64 | 64 |
65 const bool kIgnoreCase = false; | 65 const bool kIgnoreCase = false; |
66 const bool kCaseSensitive = true; | 66 const bool kCaseSensitive = true; |
67 | 67 |
68 const int kMoveIterations = 30; | 68 const int kMoveIterations = 30; |
69 | 69 |
70 class FindInPageControllerTest : public InProcessBrowserTest { | 70 class FindInPageControllerTest : public InProcessBrowserTest { |
71 public: | 71 public: |
72 FindInPageControllerTest() { | 72 FindInPageControllerTest() { |
73 EnableDOMAutomation(); | |
74 | |
75 #if defined(TOOLKIT_VIEWS) | 73 #if defined(TOOLKIT_VIEWS) |
76 DropdownBarHost::disable_animations_during_testing_ = true; | 74 DropdownBarHost::disable_animations_during_testing_ = true; |
77 #elif defined(TOOLKIT_GTK) | 75 #elif defined(TOOLKIT_GTK) |
78 SlideAnimatorGtk::SetAnimationsForTesting(false); | 76 SlideAnimatorGtk::SetAnimationsForTesting(false); |
79 #elif defined(OS_MACOSX) | 77 #elif defined(OS_MACOSX) |
80 FindBarBridge::disable_animations_during_testing_ = true; | 78 FindBarBridge::disable_animations_during_testing_ = true; |
81 #endif | 79 #endif |
82 } | 80 } |
83 | 81 |
84 protected: | 82 protected: |
(...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 ui_test_utils::RunAllPendingInMessageLoop(); // Needed on Linux. | 1250 ui_test_utils::RunAllPendingInMessageLoop(); // Needed on Linux. |
1253 EXPECT_TRUE(GetFindBarWindowInfo(&position, NULL)); | 1251 EXPECT_TRUE(GetFindBarWindowInfo(&position, NULL)); |
1254 | 1252 |
1255 ui_test_utils::NavigateToURLWithDisposition( | 1253 ui_test_utils::NavigateToURLWithDisposition( |
1256 browser(), url, NEW_FOREGROUND_TAB, | 1254 browser(), url, NEW_FOREGROUND_TAB, |
1257 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); | 1255 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); |
1258 chrome::CloseTab(browser()); | 1256 chrome::CloseTab(browser()); |
1259 EXPECT_TRUE(GetFindBarWindowInfo(&position2, NULL)); | 1257 EXPECT_TRUE(GetFindBarWindowInfo(&position2, NULL)); |
1260 EXPECT_EQ(position, position2); | 1258 EXPECT_EQ(position, position2); |
1261 } | 1259 } |
OLD | NEW |