OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include "ash/common/system/tray/system_tray.h" | 7 #include "ash/common/system/tray/system_tray.h" |
8 #include "ash/common/wm_shell.h" | 8 #include "ash/common/wm_shell.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/sticky_keys/sticky_keys_controller.h" | 10 #include "ash/sticky_keys/sticky_keys_controller.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 EXPECT_EQ(tab_count, tab_strip_model->count()); | 150 EXPECT_EQ(tab_count, tab_strip_model->count()); |
151 } | 151 } |
152 | 152 |
153 IN_PROC_BROWSER_TEST_F(StickyKeysBrowserTest, SearchLeftOmnibox) { | 153 IN_PROC_BROWSER_TEST_F(StickyKeysBrowserTest, SearchLeftOmnibox) { |
154 EnableStickyKeys(); | 154 EnableStickyKeys(); |
155 | 155 |
156 OmniboxView* omnibox = | 156 OmniboxView* omnibox = |
157 browser()->window()->GetLocationBar()->GetOmniboxView(); | 157 browser()->window()->GetLocationBar()->GetOmniboxView(); |
158 | 158 |
159 // Give the omnibox focus. | 159 // Give the omnibox focus. |
160 omnibox->ShowURL(); | 160 omnibox->SetFocus(); |
161 | 161 |
162 // Make sure that the AppList is not erronously displayed and the omnibox | 162 // Make sure that the AppList is not erroneously displayed and the omnibox |
163 // doesn't lost focus | 163 // doesn't lose focus. |
164 EXPECT_FALSE(ash::WmShell::Get()->GetAppListTargetVisibility()); | 164 EXPECT_FALSE(ash::WmShell::Get()->GetAppListTargetVisibility()); |
165 EXPECT_TRUE(omnibox->GetNativeView()->HasFocus()); | 165 EXPECT_TRUE(omnibox->GetNativeView()->HasFocus()); |
166 | 166 |
167 // Type 'foo'. | 167 // Type 'foo'. |
168 SendKeyPress(ui::VKEY_F); | 168 SendKeyPress(ui::VKEY_F); |
169 SendKeyPress(ui::VKEY_O); | 169 SendKeyPress(ui::VKEY_O); |
170 SendKeyPress(ui::VKEY_O); | 170 SendKeyPress(ui::VKEY_O); |
171 | 171 |
172 // Verify the location of the caret. | 172 // Verify the location of the caret. |
173 size_t start, end; | 173 size_t start, end; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 EXPECT_TRUE(sticky_keys_overlay->is_visible()); | 223 EXPECT_TRUE(sticky_keys_overlay->is_visible()); |
224 DisableStickyKeys(); | 224 DisableStickyKeys(); |
225 EXPECT_FALSE(controller->GetOverlayForTest()); | 225 EXPECT_FALSE(controller->GetOverlayForTest()); |
226 for (auto key_code : modifier_keys) { | 226 for (auto key_code : modifier_keys) { |
227 SendKeyPress(key_code); | 227 SendKeyPress(key_code); |
228 EXPECT_FALSE(controller->GetOverlayForTest()); | 228 EXPECT_FALSE(controller->GetOverlayForTest()); |
229 } | 229 } |
230 } | 230 } |
231 | 231 |
232 } // namespace chromeos | 232 } // namespace chromeos |
OLD | NEW |