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

Side by Side Diff: chrome/browser/browser_keyevents_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
« no previous file with comments | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/chrome_switches_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 private: 121 private:
122 bool finished_; 122 bool finished_;
123 bool waiting_; 123 bool waiting_;
124 content::NotificationRegistrar registrar_; 124 content::NotificationRegistrar registrar_;
125 125
126 DISALLOW_COPY_AND_ASSIGN(TestFinishObserver); 126 DISALLOW_COPY_AND_ASSIGN(TestFinishObserver);
127 }; 127 };
128 128
129 class BrowserKeyEventsTest : public InProcessBrowserTest { 129 class BrowserKeyEventsTest : public InProcessBrowserTest {
130 public: 130 public:
131 BrowserKeyEventsTest() { 131 BrowserKeyEventsTest() {}
132 EnableDOMAutomation();
133 }
134 132
135 bool IsViewFocused(ViewID vid) { 133 bool IsViewFocused(ViewID vid) {
136 return ui_test_utils::IsViewFocused(browser(), vid); 134 return ui_test_utils::IsViewFocused(browser(), vid);
137 } 135 }
138 136
139 void ClickOnView(ViewID vid) { 137 void ClickOnView(ViewID vid) {
140 ui_test_utils::ClickOnView(browser(), vid); 138 ui_test_utils::ClickOnView(browser(), vid);
141 } 139 }
142 140
143 // Set the suppress flag of an event specified by |type|. If |suppress| is 141 // Set the suppress flag of an event specified by |type|. If |suppress| is
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress)); 881 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestAltKeySuppress));
884 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); 882 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
885 883
886 // Ctrl+Alt should have no effect. 884 // Ctrl+Alt should have no effect.
887 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey)); 885 EXPECT_NO_FATAL_FAILURE(TestKeyEvent(tab_index, kTestCtrlAltKey));
888 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER)); 886 ASSERT_TRUE(IsViewFocused(VIEW_ID_TAB_CONTAINER));
889 } 887 }
890 #endif 888 #endif
891 889
892 } // namespace 890 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/browser_focus_uitest.cc ('k') | chrome/browser/chrome_switches_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698