| OLD | NEW |
| 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 "chrome/browser/ui/ash/ime_controller_chromeos.h" | 5 #include "chrome/browser/ui/ash/ime_controller_chromeos.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" | 8 #include "chrome/browser/chromeos/input_method/mock_input_method_manager.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/base/accelerators/accelerator.h" | 10 #include "ui/base/accelerators/accelerator.h" |
| 11 #include "ui/base/events.h" | 11 #include "ui/base/events/event_constants.h" |
| 12 #include "ui/base/keycodes/keyboard_codes.h" | 12 #include "ui/base/keycodes/keyboard_codes.h" |
| 13 | 13 |
| 14 class ImeControllerTest : public testing::Test { | 14 class ImeControllerTest : public testing::Test { |
| 15 public: | 15 public: |
| 16 ImeControllerTest() : mock_input_method_manager_(NULL) {} | 16 ImeControllerTest() : mock_input_method_manager_(NULL) {} |
| 17 virtual ~ImeControllerTest() {} | 17 virtual ~ImeControllerTest() {} |
| 18 | 18 |
| 19 virtual void SetUp() OVERRIDE { | 19 virtual void SetUp() OVERRIDE { |
| 20 mock_input_method_manager_ = | 20 mock_input_method_manager_ = |
| 21 new chromeos::input_method::MockInputMethodManager; | 21 new chromeos::input_method::MockInputMethodManager; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 ui::Accelerator accel(ui::VKEY_1, ui::EF_SHIFT_DOWN); | 70 ui::Accelerator accel(ui::VKEY_1, ui::EF_SHIFT_DOWN); |
| 71 ui::Accelerator remapped = controller_.RemapAccelerator(accel); | 71 ui::Accelerator remapped = controller_.RemapAccelerator(accel); |
| 72 ui::Accelerator expected(ui::VKEY_1, 0); | 72 ui::Accelerator expected(ui::VKEY_1, 0); |
| 73 EXPECT_EQ(expected, remapped); | 73 EXPECT_EQ(expected, remapped); |
| 74 accel.set_type(ui::ET_KEY_RELEASED); | 74 accel.set_type(ui::ET_KEY_RELEASED); |
| 75 remapped = controller_.RemapAccelerator(accel); | 75 remapped = controller_.RemapAccelerator(accel); |
| 76 expected.set_type(ui::ET_KEY_RELEASED); | 76 expected.set_type(ui::ET_KEY_RELEASED); |
| 77 EXPECT_EQ(expected, remapped); | 77 EXPECT_EQ(expected, remapped); |
| 78 } | 78 } |
| 79 } | 79 } |
| OLD | NEW |