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

Side by Side Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 10388023: AcceleratorController::AcceleratorPressed() should return true whenever some action is taken (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/accelerators/accelerator_controller.h" 5 #include "ash/accelerators/accelerator_controller.h"
6 #include "ash/caps_lock_delegate.h" 6 #include "ash/caps_lock_delegate.h"
7 #include "ash/ime_control_delegate.h" 7 #include "ash/ime_control_delegate.h"
8 #include "ash/screenshot_delegate.h" 8 #include "ash/screenshot_delegate.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 EXPECT_EQ(2, delegate->handle_take_screenshot_count()); 439 EXPECT_EQ(2, delegate->handle_take_screenshot_count());
440 EXPECT_EQ(0, delegate->handle_take_partial_screenshot_count()); 440 EXPECT_EQ(0, delegate->handle_take_partial_screenshot_count());
441 EXPECT_TRUE(GetController()->Process( 441 EXPECT_TRUE(GetController()->Process(
442 ui::Accelerator(ui::VKEY_F5, true, true, false))); 442 ui::Accelerator(ui::VKEY_F5, true, true, false)));
443 EXPECT_EQ(2, delegate->handle_take_screenshot_count()); 443 EXPECT_EQ(2, delegate->handle_take_screenshot_count());
444 EXPECT_EQ(1, delegate->handle_take_partial_screenshot_count()); 444 EXPECT_EQ(1, delegate->handle_take_partial_screenshot_count());
445 } 445 }
446 // ToggleAppList 446 // ToggleAppList
447 { 447 {
448 EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility()); 448 EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
449 EXPECT_FALSE(GetController()->Process( 449 EXPECT_TRUE(GetController()->Process(
450 ui::Accelerator(ui::VKEY_LWIN, false, true, false))); 450 ui::Accelerator(ui::VKEY_LWIN, false, true, false)));
451 EXPECT_TRUE(ash::Shell::GetInstance()->GetAppListTargetVisibility()); 451 EXPECT_TRUE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
452 EXPECT_FALSE(GetController()->Process( 452 EXPECT_TRUE(GetController()->Process(
453 ui::Accelerator(ui::VKEY_LWIN, false, true, false))); 453 ui::Accelerator(ui::VKEY_LWIN, false, true, false)));
454 EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility()); 454 EXPECT_FALSE(ash::Shell::GetInstance()->GetAppListTargetVisibility());
455 } 455 }
456 // ToggleCapsLock 456 // ToggleCapsLock
457 { 457 {
458 EXPECT_FALSE(GetController()->Process( 458 EXPECT_FALSE(GetController()->Process(
459 ui::Accelerator(ui::VKEY_LWIN, true, false, false))); 459 ui::Accelerator(ui::VKEY_LWIN, true, false, false)));
460 DummyCapsLockDelegate* delegate = new DummyCapsLockDelegate(false); 460 DummyCapsLockDelegate* delegate = new DummyCapsLockDelegate(false);
461 GetController()->SetCapsLockDelegate( 461 GetController()->SetCapsLockDelegate(
462 scoped_ptr<CapsLockDelegate>(delegate).Pass()); 462 scoped_ptr<CapsLockDelegate>(delegate).Pass());
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 EXPECT_FALSE(GetController()->Process(shift_alt_press)); 722 EXPECT_FALSE(GetController()->Process(shift_alt_press));
723 EXPECT_FALSE(GetController()->Process(shift_alt_x_press)); 723 EXPECT_FALSE(GetController()->Process(shift_alt_x_press));
724 EXPECT_FALSE(GetController()->Process(shift_alt_x)); 724 EXPECT_FALSE(GetController()->Process(shift_alt_x));
725 EXPECT_FALSE(GetController()->Process(shift_alt)); 725 EXPECT_FALSE(GetController()->Process(shift_alt));
726 EXPECT_EQ(2, delegate->handle_next_ime_count()); 726 EXPECT_EQ(2, delegate->handle_next_ime_count());
727 } 727 }
728 } 728 }
729 729
730 } // namespace test 730 } // namespace test
731 } // namespace ash 731 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698