OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(TOOLKIT_VIEWS) | 8 #if defined(TOOLKIT_VIEWS) |
9 | 9 |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 IN_PROC_BROWSER_TEST_F(KeyboardAccessTest, TestMenuKeyboardAccess) { | 203 IN_PROC_BROWSER_TEST_F(KeyboardAccessTest, TestMenuKeyboardAccess) { |
204 TestMenuKeyboardAccess(false, false); | 204 TestMenuKeyboardAccess(false, false); |
205 } | 205 } |
206 | 206 |
207 // If this flakes, use http://crbug.com/62310. | 207 // If this flakes, use http://crbug.com/62310. |
208 IN_PROC_BROWSER_TEST_F(KeyboardAccessTest, TestAltMenuKeyboardAccess) { | 208 IN_PROC_BROWSER_TEST_F(KeyboardAccessTest, TestAltMenuKeyboardAccess) { |
209 TestMenuKeyboardAccess(true, false); | 209 TestMenuKeyboardAccess(true, false); |
210 } | 210 } |
211 | 211 |
212 // If this flakes, use http://crbug.com/62311. | 212 // If this flakes, use http://crbug.com/62311. |
213 IN_PROC_BROWSER_TEST_F(KeyboardAccessTest, TestShiftAltMenuKeyboardAccess) { | 213 #if defined(OS_WIN) |
| 214 #define MAYBE_TestShiftAltMenuKeyboardAccess FLAKY_TestShiftAltMenuKeyboardAcces
s |
| 215 #else |
| 216 #define MAYBE_TestShiftAltMenuKeyboardAccess TestShiftAltMenuKeyboardAccess |
| 217 #endif |
| 218 IN_PROC_BROWSER_TEST_F(KeyboardAccessTest, |
| 219 MAYBE_TestShiftAltMenuKeyboardAccess) { |
214 TestMenuKeyboardAccess(true, true); | 220 TestMenuKeyboardAccess(true, true); |
215 } | 221 } |
216 | 222 |
217 // Test that JavaScript cannot intercept reserved keyboard accelerators like | 223 // Test that JavaScript cannot intercept reserved keyboard accelerators like |
218 // ctrl-t to open a new tab or ctrl-f4 to close a tab. | 224 // ctrl-t to open a new tab or ctrl-f4 to close a tab. |
219 // TODO(isherman): This test times out on ChromeOS. We should merge it with | 225 // TODO(isherman): This test times out on ChromeOS. We should merge it with |
220 // BrowserKeyEventsTest.ReservedAccelerators, but just disable for now. | 226 // BrowserKeyEventsTest.ReservedAccelerators, but just disable for now. |
221 // If this flakes, use http://crbug.com/62311. | 227 // If this flakes, use http://crbug.com/62311. |
222 IN_PROC_BROWSER_TEST_F(KeyboardAccessTest, ReserveKeyboardAccelerators) { | 228 IN_PROC_BROWSER_TEST_F(KeyboardAccessTest, ReserveKeyboardAccelerators) { |
223 const std::string kBadPage = | 229 const std::string kBadPage = |
(...skipping 18 matching lines...) Expand all Loading... |
242 ASSERT_EQ(2, browser()->active_index()); | 248 ASSERT_EQ(2, browser()->active_index()); |
243 | 249 |
244 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( | 250 ASSERT_TRUE(ui_test_utils::SendKeyPressSync( |
245 browser(), ui::VKEY_W, true, false, false, false)); | 251 browser(), ui::VKEY_W, true, false, false, false)); |
246 ASSERT_EQ(0, browser()->active_index()); | 252 ASSERT_EQ(0, browser()->active_index()); |
247 } | 253 } |
248 | 254 |
249 } // namespace | 255 } // namespace |
250 | 256 |
251 #endif // defined(TOOLKIT_VIEWS) | 257 #endif // defined(TOOLKIT_VIEWS) |
OLD | NEW |