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

Side by Side Diff: chrome/browser/ui/find_bar/find_bar_host_browsertest.cc

Issue 10778044: Always enable dom automation for browser_tests. This avoids developers having to call EnableDOMAuto… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ssl/ssl_browser_tests.cc ('k') | chrome/browser/ui/fullscreen/fullscreen_controller_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698