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 "app/keyboard_codes.h" | 5 #include "app/keyboard_codes.h" |
6 #include "chrome/test/automation/browser_proxy.h" | 6 #include "chrome/test/automation/browser_proxy.h" |
7 #include "chrome/test/automation/tab_proxy.h" | 7 #include "chrome/test/automation/tab_proxy.h" |
8 #include "chrome/test/automation/window_proxy.h" | 8 #include "chrome/test/automation/window_proxy.h" |
9 #include "chrome/test/ui/ui_test.h" | 9 #include "chrome/test/ui/ui_test.h" |
10 #include "googleurl/src/gurl.h" | 10 #include "googleurl/src/gurl.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // Disabled, http://crbug.com/62310. | 108 // Disabled, http://crbug.com/62310. |
109 TEST_F(KeyboardAccessTest, DISABLED_TestMenuKeyboardAccess) { | 109 TEST_F(KeyboardAccessTest, DISABLED_TestMenuKeyboardAccess) { |
110 TestMenuKeyboardAccess(false, 0); | 110 TestMenuKeyboardAccess(false, 0); |
111 } | 111 } |
112 | 112 |
113 // Disabled, http://crbug.com/62310. | 113 // Disabled, http://crbug.com/62310. |
114 TEST_F(KeyboardAccessTest, DISABLED_TestAltMenuKeyboardAccess) { | 114 TEST_F(KeyboardAccessTest, DISABLED_TestAltMenuKeyboardAccess) { |
115 TestMenuKeyboardAccess(true, 0); | 115 TestMenuKeyboardAccess(true, 0); |
116 } | 116 } |
117 | 117 |
118 TEST_F(KeyboardAccessTest, TestShiftAltMenuKeyboardAccess) { | 118 // Flaky, http://crbug.com/62311. |
| 119 TEST_F(KeyboardAccessTest, FLAKY_TestShiftAltMenuKeyboardAccess) { |
119 TestMenuKeyboardAccess(true, views::Event::EF_SHIFT_DOWN); | 120 TestMenuKeyboardAccess(true, views::Event::EF_SHIFT_DOWN); |
120 } | 121 } |
121 | 122 |
| 123 #if defined(OS_CHROMEOS) |
122 // TODO(isherman): This test times out on ChromeOS. We should merge it with | 124 // TODO(isherman): This test times out on ChromeOS. We should merge it with |
123 // BrowserKeyEventsTest.ReservedAccelerators, but just disable for now. | 125 // BrowserKeyEventsTest.ReservedAccelerators, but just disable for now. |
124 #if defined(OS_CHROMEOS) | |
125 #define MAYBE_ReserveKeyboardAccelerators DISABLED_ReserveKeyboardAccelerators | 126 #define MAYBE_ReserveKeyboardAccelerators DISABLED_ReserveKeyboardAccelerators |
126 #else | 127 #else |
127 #define MAYBE_ReserveKeyboardAccelerators ReserveKeyboardAccelerators | 128 // Flaky, http://crbug.com/62311. |
| 129 #define MAYBE_ReserveKeyboardAccelerators FLAKY_ReserveKeyboardAccelerators |
128 #endif | 130 #endif |
129 | 131 |
130 // Test that JavaScript cannot intercept reserved keyboard accelerators like | 132 // Test that JavaScript cannot intercept reserved keyboard accelerators like |
131 // ctrl-t to open a new tab or ctrl-f4 to close a tab. | 133 // ctrl-t to open a new tab or ctrl-f4 to close a tab. |
132 TEST_F(KeyboardAccessTest, MAYBE_ReserveKeyboardAccelerators) { | 134 TEST_F(KeyboardAccessTest, MAYBE_ReserveKeyboardAccelerators) { |
133 const std::string kBadPage = | 135 const std::string kBadPage = |
134 "<html><script>" | 136 "<html><script>" |
135 "document.onkeydown = function() {" | 137 "document.onkeydown = function() {" |
136 " event.preventDefault();" | 138 " event.preventDefault();" |
137 " return false;" | 139 " return false;" |
(...skipping 20 matching lines...) Expand all Loading... |
158 ASSERT_TRUE(browser->ActivateTab(1)); | 160 ASSERT_TRUE(browser->ActivateTab(1)); |
159 ASSERT_TRUE(window->SimulateOSKeyPress( | 161 ASSERT_TRUE(window->SimulateOSKeyPress( |
160 app::VKEY_F4, views::Event::EF_CONTROL_DOWN)); | 162 app::VKEY_F4, views::Event::EF_CONTROL_DOWN)); |
161 ASSERT_TRUE(browser->WaitForTabCountToBecome(1)); | 163 ASSERT_TRUE(browser->WaitForTabCountToBecome(1)); |
162 #endif | 164 #endif |
163 } | 165 } |
164 | 166 |
165 } // namespace | 167 } // namespace |
166 | 168 |
167 #endif // defined(TOOLKIT_VIEWS) | 169 #endif // defined(TOOLKIT_VIEWS) |
OLD | NEW |