| 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/chromeos/input_method/input_method_manager_impl.h" | 5 #include "chrome/browser/chromeos/input_method/input_method_manager_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "ash/ime/input_method_menu_item.h" | 9 #include "ash/ime/input_method_menu_item.h" |
| 10 #include "ash/ime/input_method_menu_manager.h" | 10 #include "ash/ime/input_method_menu_manager.h" |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 virtual ~InputMethodManagerImplTest() {} | 123 virtual ~InputMethodManagerImplTest() {} |
| 124 | 124 |
| 125 virtual void SetUp() OVERRIDE { | 125 virtual void SetUp() OVERRIDE { |
| 126 profile_manager_.reset(new TestingProfileManager(GetBrowserProcess())); | 126 profile_manager_.reset(new TestingProfileManager(GetBrowserProcess())); |
| 127 ASSERT_TRUE(profile_manager_->SetUp()); | 127 ASSERT_TRUE(profile_manager_->SetUp()); |
| 128 | 128 |
| 129 ui::InitializeInputMethodForTesting(); | 129 ui::InitializeInputMethodForTesting(); |
| 130 | 130 |
| 131 delegate_ = new FakeInputMethodDelegate(); | 131 delegate_ = new FakeInputMethodDelegate(); |
| 132 manager_.reset(new InputMethodManagerImpl( | 132 manager_.reset(new InputMethodManagerImpl( |
| 133 scoped_ptr<InputMethodDelegate>(delegate_))); | 133 scoped_ptr<InputMethodDelegate>(delegate_), false)); |
| 134 manager_->GetInputMethodUtil()->UpdateHardwareLayoutCache(); | 134 manager_->GetInputMethodUtil()->UpdateHardwareLayoutCache(); |
| 135 candidate_window_controller_ = new MockCandidateWindowController; | 135 candidate_window_controller_ = new MockCandidateWindowController; |
| 136 manager_->SetCandidateWindowControllerForTesting( | 136 manager_->SetCandidateWindowControllerForTesting( |
| 137 candidate_window_controller_); | 137 candidate_window_controller_); |
| 138 keyboard_ = new FakeImeKeyboard; | 138 keyboard_ = new FakeImeKeyboard; |
| 139 manager_->SetImeKeyboardForTesting(keyboard_); | 139 manager_->SetImeKeyboardForTesting(keyboard_); |
| 140 mock_engine_handler_.reset(new MockInputMethodEngine()); | 140 mock_engine_handler_.reset(new MockInputMethodEngine()); |
| 141 IMEBridge::Initialize(); | 141 IMEBridge::Initialize(); |
| 142 IMEBridge::Get()->SetCurrentEngineHandler(mock_engine_handler_.get()); | 142 IMEBridge::Get()->SetCurrentEngineHandler(mock_engine_handler_.get()); |
| 143 | 143 |
| (...skipping 1167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 ASSERT_EQ(4U, input_method_ids.size()); | 1311 ASSERT_EQ(4U, input_method_ids.size()); |
| 1312 | 1312 |
| 1313 EXPECT_EQ(ImeIdFromEngineId("xkb:us::eng"), input_method_ids[0]); | 1313 EXPECT_EQ(ImeIdFromEngineId("xkb:us::eng"), input_method_ids[0]); |
| 1314 EXPECT_EQ(ImeIdFromEngineId("xkb:fr::fra"), input_method_ids[1]); | 1314 EXPECT_EQ(ImeIdFromEngineId("xkb:fr::fra"), input_method_ids[1]); |
| 1315 EXPECT_EQ("_comp_ime_asdf_pinyin", input_method_ids[2]); | 1315 EXPECT_EQ("_comp_ime_asdf_pinyin", input_method_ids[2]); |
| 1316 EXPECT_EQ(ImeIdFromEngineId("zh-t-i0-pinyin"), input_method_ids[3]); | 1316 EXPECT_EQ(ImeIdFromEngineId("zh-t-i0-pinyin"), input_method_ids[3]); |
| 1317 } | 1317 } |
| 1318 | 1318 |
| 1319 } // namespace input_method | 1319 } // namespace input_method |
| 1320 } // namespace chromeos | 1320 } // namespace chromeos |
| OLD | NEW |