OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/keyboard_codes.h" | 5 #include "app/keyboard_codes.h" |
6 #include "chrome/browser/automation/ui_controls.h" | 6 #include "chrome/browser/automation/ui_controls.h" |
7 #include "chrome/browser/views/chrome_views_delegate.h" | 7 #include "chrome/browser/views/chrome_views_delegate.h" |
8 #include "chrome/browser/views/frame/browser_view.h" | 8 #include "chrome/browser/views/frame/browser_view.h" |
9 #include "chrome/test/in_process_browser_test.h" | 9 #include "chrome/test/in_process_browser_test.h" |
10 #include "chrome/test/ui_test_utils.h" | 10 #include "chrome/test/ui_test_utils.h" |
11 #include "views/view.h" | 11 #include "views/view.h" |
12 #include "views/accessibility/view_accessibility.h" | 12 #include "views/accessibility/view_accessibility.h" |
13 #include "views/widget/widget.h" | 13 #include "views/widget/widget.h" |
14 #include "views/window/window.h" | 14 #include "views/window/window.h" |
15 | 15 |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 for (int i = 0; i < 3; ++i) { | 112 for (int i = 0; i < 3; ++i) { |
113 // TODO(phajdan.jr): remove logging after fixing http://crbug.com/50663. | 113 // TODO(phajdan.jr): remove logging after fixing http://crbug.com/50663. |
114 LOG(ERROR) << "Iteration no. " << i; | 114 LOG(ERROR) << "Iteration no. " << i; |
115 | 115 |
116 TabCyclerForwardAndBack(current_view_native_window()); | 116 TabCyclerForwardAndBack(current_view_native_window()); |
117 | 117 |
118 | 118 |
119 // TODO(phajdan.jr): remove logging after fixing http://crbug.com/50663. | 119 // TODO(phajdan.jr): remove logging after fixing http://crbug.com/50663. |
120 LOG(ERROR) << "Sending TAB key event..."; | 120 LOG(ERROR) << "Sending TAB key event..."; |
121 ui_controls::SendKeyPressNotifyWhenDone(current_view_native_window(), | 121 ui_controls::SendKeyPressNotifyWhenDone(current_view_native_window(), |
122 base::VKEY_TAB, | 122 app::VKEY_TAB, |
123 true, false, false, false, | 123 true, false, false, false, |
124 new MessageLoop::QuitTask()); | 124 new MessageLoop::QuitTask()); |
125 set_waiting(true); | 125 set_waiting(true); |
126 ui_test_utils::RunMessageLoop(); | 126 ui_test_utils::RunMessageLoop(); |
127 } | 127 } |
128 } | 128 } |
129 | 129 |
130 // This test is disabled, see bug 50864. | 130 // This test is disabled, see bug 50864. |
131 IN_PROC_BROWSER_TEST_F(BrowserKeyboardAccessibility, | 131 IN_PROC_BROWSER_TEST_F(BrowserKeyboardAccessibility, |
132 DISABLED_TabInPasswordManager) { | 132 DISABLED_TabInPasswordManager) { |
(...skipping 13 matching lines...) Expand all Loading... |
146 DISABLED_TabInTaskManager) { | 146 DISABLED_TabInTaskManager) { |
147 browser()->OpenTaskManager(); | 147 browser()->OpenTaskManager(); |
148 TabCyclerForwardAndBack(current_view_native_window()); | 148 TabCyclerForwardAndBack(current_view_native_window()); |
149 } | 149 } |
150 | 150 |
151 // This test is disabled, see bug 50864. | 151 // This test is disabled, see bug 50864. |
152 IN_PROC_BROWSER_TEST_F(BrowserKeyboardAccessibility, | 152 IN_PROC_BROWSER_TEST_F(BrowserKeyboardAccessibility, |
153 DISABLED_TabInToolbar) { | 153 DISABLED_TabInToolbar) { |
154 gfx::NativeWindow native_window = browser()->window()->GetNativeHandle(); | 154 gfx::NativeWindow native_window = browser()->window()->GetNativeHandle(); |
155 ui_controls::SendKeyPressNotifyWhenDone(native_window, | 155 ui_controls::SendKeyPressNotifyWhenDone(native_window, |
156 base::VKEY_T, | 156 app::VKEY_T, |
157 false, true, true, false, | 157 false, true, true, false, |
158 new MessageLoop::QuitTask()); | 158 new MessageLoop::QuitTask()); |
159 set_waiting(true); | 159 set_waiting(true); |
160 ui_test_utils::RunMessageLoop(); | 160 ui_test_utils::RunMessageLoop(); |
161 TabCyclerForwardAndBack(current_view_native_window()); | 161 TabCyclerForwardAndBack(current_view_native_window()); |
162 } | 162 } |
163 | 163 |
164 // This test is disabled, see bug 50864. | 164 // This test is disabled, see bug 50864. |
165 IN_PROC_BROWSER_TEST_F(BrowserKeyboardAccessibility, | 165 IN_PROC_BROWSER_TEST_F(BrowserKeyboardAccessibility, |
166 DISABLED_TabInUpdateChromeDialog) { | 166 DISABLED_TabInUpdateChromeDialog) { |
(...skipping 23 matching lines...) Expand all Loading... |
190 views::View* first_focused_item = current_view(); | 190 views::View* first_focused_item = current_view(); |
191 | 191 |
192 ASSERT_TRUE(first_focused_item != NULL); | 192 ASSERT_TRUE(first_focused_item != NULL); |
193 | 193 |
194 views::View* next_focused_item = first_focused_item; | 194 views::View* next_focused_item = first_focused_item; |
195 | 195 |
196 // Keep tabbing until we reach the originally focused view. | 196 // Keep tabbing until we reach the originally focused view. |
197 do { | 197 do { |
198 // TODO(phajdan.jr): remove logging after fixing http://crbug.com/50663. | 198 // TODO(phajdan.jr): remove logging after fixing http://crbug.com/50663. |
199 LOG(ERROR) << "Sending TAB key event."; | 199 LOG(ERROR) << "Sending TAB key event."; |
200 ui_controls::SendKeyPressNotifyWhenDone(hwnd, base::VKEY_TAB, | 200 ui_controls::SendKeyPressNotifyWhenDone(hwnd, app::VKEY_TAB, |
201 false, !forward_tab, false, false, new MessageLoop::QuitTask()); | 201 false, !forward_tab, false, false, new MessageLoop::QuitTask()); |
202 set_waiting(true); | 202 set_waiting(true); |
203 ui_test_utils::RunMessageLoop(); | 203 ui_test_utils::RunMessageLoop(); |
204 next_focused_item = current_view(); | 204 next_focused_item = current_view(); |
205 } while (first_focused_item != next_focused_item); | 205 } while (first_focused_item != next_focused_item); |
206 // TODO(phajdan.jr): remove logging after fixing http://crbug.com/50663. | 206 // TODO(phajdan.jr): remove logging after fixing http://crbug.com/50663. |
207 LOG(ERROR) << "After second loop."; | 207 LOG(ERROR) << "After second loop."; |
208 } | 208 } |
209 | 209 |
210 } // namespace | 210 } // namespace |
OLD | NEW |