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

Side by Side Diff: chrome/browser/ui/views/keyboard_access_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 // This functionality currently works on Windows and on Linux when 5 // This functionality currently works on Windows and on Linux when
6 // toolkit_views is defined (i.e. for Chrome OS). It's not needed 6 // toolkit_views is defined (i.e. for Chrome OS). It's not needed
7 // on the Mac, and it's not yet implemented on Linux. 7 // on the Mac, and it's not yet implemented on Linux.
8 8
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 } 94 }
95 95
96 ToolbarView* toolbar_view_; 96 ToolbarView* toolbar_view_;
97 Browser* browser_; 97 Browser* browser_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(SendKeysMenuListener); 99 DISALLOW_COPY_AND_ASSIGN(SendKeysMenuListener);
100 }; 100 };
101 101
102 class KeyboardAccessTest : public InProcessBrowserTest { 102 class KeyboardAccessTest : public InProcessBrowserTest {
103 public: 103 public:
104 KeyboardAccessTest() { 104 KeyboardAccessTest() {}
105 EnableDOMAutomation();
106 }
107 105
108 // Use the keyboard to select "New Tab" from the app menu. 106 // Use the keyboard to select "New Tab" from the app menu.
109 // This test depends on the fact that there is one menu and that 107 // This test depends on the fact that there is one menu and that
110 // New Tab is the first item in the menu. If the menus change, 108 // New Tab is the first item in the menu. If the menus change,
111 // this test will need to be changed to reflect that. 109 // this test will need to be changed to reflect that.
112 // 110 //
113 // If alternate_key_sequence is true, use "Alt" instead of "F10" to 111 // If alternate_key_sequence is true, use "Alt" instead of "F10" to
114 // open the menu bar, and "Down" instead of "Enter" to open a menu. 112 // open the menu bar, and "Down" instead of "Enter" to open a menu.
115 void TestMenuKeyboardAccess(bool alternate_key_sequence, bool shift); 113 void TestMenuKeyboardAccess(bool alternate_key_sequence, bool shift);
116 114
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 browser(), url, NEW_FOREGROUND_TAB, 255 browser(), url, NEW_FOREGROUND_TAB,
258 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION); 256 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
259 ASSERT_EQ(2, browser()->active_index()); 257 ASSERT_EQ(2, browser()->active_index());
260 258
261 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( 259 ASSERT_TRUE(ui_test_utils::SendKeyPressSync(
262 browser(), ui::VKEY_W, true, false, false, false)); 260 browser(), ui::VKEY_W, true, false, false, false));
263 ASSERT_EQ(0, browser()->active_index()); 261 ASSERT_EQ(0, browser()->active_index());
264 } 262 }
265 263
266 } // namespace 264 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/pdf/pdf_browsertest.cc ('k') | chrome/browser/ui/webui/bookmarks_ui_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698