OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "base/logging.h" | |
6 #include "chrome/browser/chromeos/input_method/ibus_ui_controller.h" | |
7 #include "chrome/browser/chromeos/input_method/input_method_descriptor.h" | |
8 #include "testing/gtest/include/gtest/gtest.h" | |
9 | |
10 namespace chromeos { | |
11 namespace input_method { | |
12 | |
13 // TODO(nona): Add more tests (crosbug.com/26334). | |
14 | |
15 TEST(IBusUiControllerTest, TestIsActive) { | |
16 InputMethodDescriptors descriptors; | |
17 EXPECT_FALSE(IsActiveForTesting("mozc", &descriptors)); | |
18 descriptors.push_back( | |
19 InputMethodDescriptor("mozc", "name", "us", "en-US", false)); | |
20 EXPECT_TRUE(IsActiveForTesting("mozc", &descriptors)); | |
21 EXPECT_FALSE(IsActiveForTesting("mozc-jp", &descriptors)); | |
22 descriptors.push_back( | |
23 InputMethodDescriptor("xkb:us::eng", "name", "us", "en-US", false)); | |
24 EXPECT_TRUE(IsActiveForTesting("xkb:us::eng", &descriptors)); | |
25 EXPECT_TRUE(IsActiveForTesting("mozc", &descriptors)); | |
26 EXPECT_FALSE(IsActiveForTesting("mozc-jp", &descriptors)); | |
27 } | |
28 | |
29 } // namespace input_method | |
30 } // namespace chromeos | |
OLD | NEW |