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

Side by Side Diff: chrome/browser/browser_focus_uitest.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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/format_macros.h" 9 #include "base/format_macros.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 }; 153 };
154 154
155 class BrowserFocusTest : public InProcessBrowserTest { 155 class BrowserFocusTest : public InProcessBrowserTest {
156 public: 156 public:
157 BrowserFocusTest() : 157 BrowserFocusTest() :
158 #if defined(USE_AURA) 158 #if defined(USE_AURA)
159 location_bar_focus_view_id_(VIEW_ID_OMNIBOX) 159 location_bar_focus_view_id_(VIEW_ID_OMNIBOX)
160 #else 160 #else
161 location_bar_focus_view_id_(VIEW_ID_LOCATION_BAR) 161 location_bar_focus_view_id_(VIEW_ID_LOCATION_BAR)
162 #endif 162 #endif
163 { 163 {}
164 EnableDOMAutomation();
165 }
166 164
167 bool IsViewFocused(ViewID vid) { 165 bool IsViewFocused(ViewID vid) {
168 return ui_test_utils::IsViewFocused(browser(), vid); 166 return ui_test_utils::IsViewFocused(browser(), vid);
169 } 167 }
170 168
171 void ClickOnView(ViewID vid) { 169 void ClickOnView(ViewID vid) {
172 ui_test_utils::ClickOnView(browser(), vid); 170 ui_test_utils::ClickOnView(browser(), vid);
173 } 171 }
174 172
175 bool WaitForFocusChange(ViewID vid) { 173 bool WaitForFocusChange(ViewID vid) {
(...skipping 751 matching lines...) Expand 10 before | Expand all | Expand 10 after
927 chrome::Reload(browser(), CURRENT_TAB); 925 chrome::Reload(browser(), CURRENT_TAB);
928 observer.Wait(); 926 observer.Wait();
929 } 927 }
930 928
931 // Focus should now be on the tab contents. 929 // Focus should now be on the tab contents.
932 chrome::ShowDownloads(browser()); 930 chrome::ShowDownloads(browser());
933 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); 931 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
934 } 932 }
935 933
936 } // namespace 934 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_tab_helper_browsertest.cc ('k') | chrome/browser/browser_keyevents_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698