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

Side by Side Diff: ash/common/system/chromeos/ime_menu/ime_menu_tray_unittest.cc

Issue 2752593008: Move AcceleratorController from WmShell to Shell (Closed)
Patch Set: fix include Created 3 years, 9 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
« no previous file with comments | « ash/common/mojo_interface_factory.cc ('k') | ash/common/system/tray/system_tray_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "ash/common/system/chromeos/ime_menu/ime_menu_tray.h" 5 #include "ash/common/system/chromeos/ime_menu/ime_menu_tray.h"
6 6
7 #include "ash/common/accelerators/accelerator_controller.h" 7 #include "ash/common/accelerators/accelerator_controller.h"
8 #include "ash/common/accessibility_delegate.h" 8 #include "ash/common/accessibility_delegate.h"
9 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h" 9 #include "ash/common/system/chromeos/ime_menu/ime_list_view.h"
10 #include "ash/common/system/status_area_widget.h" 10 #include "ash/common/system/status_area_widget.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 EXPECT_TRUE(IsTrayBackgroundActive()); 229 EXPECT_TRUE(IsTrayBackgroundActive());
230 EXPECT_TRUE(IsBubbleShown()); 230 EXPECT_TRUE(IsBubbleShown());
231 } 231 }
232 232
233 // Tests using 'Alt+Shift+K' to open the menu. 233 // Tests using 'Alt+Shift+K' to open the menu.
234 TEST_F(ImeMenuTrayTest, TestAccelerator) { 234 TEST_F(ImeMenuTrayTest, TestAccelerator) {
235 WmShell::Get()->system_tray_notifier()->NotifyRefreshIMEMenu(true); 235 WmShell::Get()->system_tray_notifier()->NotifyRefreshIMEMenu(true);
236 ASSERT_TRUE(IsVisible()); 236 ASSERT_TRUE(IsVisible());
237 ASSERT_FALSE(IsTrayBackgroundActive()); 237 ASSERT_FALSE(IsTrayBackgroundActive());
238 238
239 WmShell::Get()->accelerator_controller()->PerformActionIfEnabled( 239 Shell::Get()->accelerator_controller()->PerformActionIfEnabled(
240 SHOW_IME_MENU_BUBBLE); 240 SHOW_IME_MENU_BUBBLE);
241 EXPECT_TRUE(IsTrayBackgroundActive()); 241 EXPECT_TRUE(IsTrayBackgroundActive());
242 EXPECT_TRUE(IsBubbleShown()); 242 EXPECT_TRUE(IsBubbleShown());
243 243
244 ui::GestureEvent tap(0, 0, 0, base::TimeTicks(), 244 ui::GestureEvent tap(0, 0, 0, base::TimeTicks(),
245 ui::GestureEventDetails(ui::ET_GESTURE_TAP)); 245 ui::GestureEventDetails(ui::ET_GESTURE_TAP));
246 GetTray()->PerformAction(tap); 246 GetTray()->PerformAction(tap);
247 EXPECT_FALSE(IsTrayBackgroundActive()); 247 EXPECT_FALSE(IsTrayBackgroundActive());
248 EXPECT_FALSE(IsBubbleShown()); 248 EXPECT_FALSE(IsBubbleShown());
249 } 249 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 input_method_manager = chromeos::input_method::InputMethodManager::Get(); 305 input_method_manager = chromeos::input_method::InputMethodManager::Get();
306 EXPECT_TRUE(input_method_manager && 306 EXPECT_TRUE(input_method_manager &&
307 input_method_manager->IsEmojiHandwritingVoiceOnImeMenuEnabled()); 307 input_method_manager->IsEmojiHandwritingVoiceOnImeMenuEnabled());
308 EXPECT_TRUE(GetTray()->ShouldShowEmojiHandwritingVoiceButtons()); 308 EXPECT_TRUE(GetTray()->ShouldShowEmojiHandwritingVoiceButtons());
309 309
310 FocusInInputContext(ui::TEXT_INPUT_TYPE_PASSWORD); 310 FocusInInputContext(ui::TEXT_INPUT_TYPE_PASSWORD);
311 EXPECT_FALSE(GetTray()->ShouldShowEmojiHandwritingVoiceButtons()); 311 EXPECT_FALSE(GetTray()->ShouldShowEmojiHandwritingVoiceButtons());
312 } 312 }
313 313
314 } // namespace ash 314 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/mojo_interface_factory.cc ('k') | ash/common/system/tray/system_tray_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698