| 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 "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/bind_helpers.h" | 11 #include "base/bind_helpers.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/message_loop/message_loop.h" | 15 #include "base/message_loop/message_loop.h" |
| 16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
| 17 #include "chrome/browser/chromeos/input_method/input_method_engine_interface.h" | 17 #include "chrome/browser/chromeos/input_method/input_method_engine_interface.h" |
| 18 #include "chrome/browser/chromeos/input_method/mock_candidate_window_controller.
h" | 18 #include "chrome/browser/chromeos/input_method/mock_candidate_window_controller.
h" |
| 19 #include "chrome/browser/chromeos/input_method/mock_input_method_engine.h" | 19 #include "chrome/browser/chromeos/input_method/mock_input_method_engine.h" |
| 20 #include "chrome/test/base/browser_with_test_window_test.h" | 20 #include "chrome/test/base/browser_with_test_window_test.h" |
| 21 #include "chrome/test/base/testing_browser_process.h" | 21 #include "chrome/test/base/testing_browser_process.h" |
| 22 #include "chrome/test/base/testing_profile.h" | 22 #include "chrome/test/base/testing_profile.h" |
| 23 #include "chrome/test/base/testing_profile_manager.h" | 23 #include "chrome/test/base/testing_profile_manager.h" |
| 24 #include "chromeos/ime/extension_ime_util.h" |
| 25 #include "chromeos/ime/fake_ime_keyboard.h" |
| 26 #include "chromeos/ime/fake_input_method_delegate.h" |
| 27 #include "chromeos/ime/mock_component_extension_ime_manager_delegate.h" |
| 24 #include "testing/gtest/include/gtest/gtest.h" | 28 #include "testing/gtest/include/gtest/gtest.h" |
| 25 #include "ui/base/accelerators/accelerator.h" | 29 #include "ui/base/accelerators/accelerator.h" |
| 26 #include "ui/base/ime/chromeos/extension_ime_util.h" | |
| 27 #include "ui/base/ime/chromeos/fake_ime_keyboard.h" | |
| 28 #include "ui/base/ime/chromeos/fake_input_method_delegate.h" | |
| 29 #include "ui/base/ime/chromeos/mock_component_extension_ime_manager_delegate.h" | |
| 30 #include "ui/base/ime/chromeos/mock_ime_engine_handler.h" | 30 #include "ui/base/ime/chromeos/mock_ime_engine_handler.h" |
| 31 #include "ui/base/ime/input_method_initializer.h" | 31 #include "ui/base/ime/input_method_initializer.h" |
| 32 #include "ui/chromeos/ime/input_method_menu_item.h" | 32 #include "ui/chromeos/ime/input_method_menu_item.h" |
| 33 #include "ui/chromeos/ime/input_method_menu_manager.h" | 33 #include "ui/chromeos/ime/input_method_menu_manager.h" |
| 34 #include "ui/events/keycodes/keyboard_codes.h" | 34 #include "ui/events/keycodes/keyboard_codes.h" |
| 35 | 35 |
| 36 namespace chromeos { | 36 namespace chromeos { |
| 37 | 37 |
| 38 namespace input_method { | 38 namespace input_method { |
| 39 namespace { | 39 namespace { |
| (...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1396 ASSERT_EQ(4U, input_method_ids.size()); | 1396 ASSERT_EQ(4U, input_method_ids.size()); |
| 1397 | 1397 |
| 1398 EXPECT_EQ(ImeIdFromEngineId("xkb:us::eng"), input_method_ids[0]); | 1398 EXPECT_EQ(ImeIdFromEngineId("xkb:us::eng"), input_method_ids[0]); |
| 1399 EXPECT_EQ(ImeIdFromEngineId("xkb:fr::fra"), input_method_ids[1]); | 1399 EXPECT_EQ(ImeIdFromEngineId("xkb:fr::fra"), input_method_ids[1]); |
| 1400 EXPECT_EQ("_comp_ime_asdf_pinyin", input_method_ids[2]); | 1400 EXPECT_EQ("_comp_ime_asdf_pinyin", input_method_ids[2]); |
| 1401 EXPECT_EQ(ImeIdFromEngineId("zh-t-i0-pinyin"), input_method_ids[3]); | 1401 EXPECT_EQ(ImeIdFromEngineId("zh-t-i0-pinyin"), input_method_ids[3]); |
| 1402 } | 1402 } |
| 1403 | 1403 |
| 1404 } // namespace input_method | 1404 } // namespace input_method |
| 1405 } // namespace chromeos | 1405 } // namespace chromeos |
| OLD | NEW |