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

Unified Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 348293002: Do not consume Alt-Shift-Up event for IME switch. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updating unit test expectations. Created 6 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | ash/ime_control_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller_unittest.cc
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 3ab5a7c82d8f92704e286710aad0bc0fea154848..ab3ec88e63d0c670aad84c9852b3799653316374 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -133,9 +133,8 @@ class DummyImeControlDelegate : public ImeControlDelegate {
}
virtual ~DummyImeControlDelegate() {}
- virtual bool HandleNextIme() OVERRIDE {
+ virtual void HandleNextIme() OVERRIDE {
++handle_next_ime_count_;
- return consume_;
}
virtual bool HandlePreviousIme(const ui::Accelerator& accelerator) OVERRIDE {
++handle_previous_ime_count_;
@@ -959,10 +958,10 @@ TEST_F(AcceleratorControllerTest, ImeGlobalAccelerators) {
scoped_ptr<ImeControlDelegate>(delegate).Pass());
EXPECT_EQ(0, delegate->handle_next_ime_count());
EXPECT_FALSE(GetController()->Process(shift_alt_press));
- EXPECT_TRUE(GetController()->Process(shift_alt));
+ EXPECT_FALSE(GetController()->Process(shift_alt));
EXPECT_EQ(1, delegate->handle_next_ime_count());
EXPECT_FALSE(GetController()->Process(alt_shift_press));
- EXPECT_TRUE(GetController()->Process(alt_shift));
+ EXPECT_FALSE(GetController()->Process(alt_shift));
EXPECT_EQ(2, delegate->handle_next_ime_count());
// We should NOT switch IME when e.g. Shift+Alt+X is pressed and X is
@@ -991,7 +990,7 @@ TEST_F(AcceleratorControllerTest, ImeGlobalAccelerators) {
EXPECT_FALSE(GetController()->Process(shift_alt_press));
EXPECT_FALSE(GetController()->Process(shift_alt_return_press));
EXPECT_FALSE(GetController()->Process(shift_alt_return));
- EXPECT_TRUE(GetController()->Process(shift_alt));
+ EXPECT_FALSE(GetController()->Process(shift_alt));
EXPECT_EQ(3, delegate->handle_next_ime_count());
const ui::Accelerator shift_alt_space_press(
@@ -1004,7 +1003,7 @@ TEST_F(AcceleratorControllerTest, ImeGlobalAccelerators) {
EXPECT_FALSE(GetController()->Process(shift_alt_press));
EXPECT_FALSE(GetController()->Process(shift_alt_space_press));
EXPECT_FALSE(GetController()->Process(shift_alt_space));
- EXPECT_TRUE(GetController()->Process(shift_alt));
+ EXPECT_FALSE(GetController()->Process(shift_alt));
EXPECT_EQ(4, delegate->handle_next_ime_count());
}
@@ -1021,10 +1020,10 @@ TEST_F(AcceleratorControllerTest, ImeGlobalAccelerators) {
scoped_ptr<ImeControlDelegate>(delegate).Pass());
EXPECT_EQ(0, delegate->handle_next_ime_count());
EXPECT_FALSE(GetController()->Process(shift_alt_press));
- EXPECT_TRUE(GetController()->Process(shift_alt));
+ EXPECT_FALSE(GetController()->Process(shift_alt));
EXPECT_EQ(1, delegate->handle_next_ime_count());
EXPECT_FALSE(GetController()->Process(alt_shift_press));
- EXPECT_TRUE(GetController()->Process(alt_shift));
+ EXPECT_FALSE(GetController()->Process(alt_shift));
EXPECT_EQ(2, delegate->handle_next_ime_count());
// We should NOT switch IME when e.g. Shift+Alt+X is pressed and X is
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | ash/ime_control_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698