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

Unified Diff: chrome/browser/chromeos/input_method/input_method_util_unittest.cc

Issue 10960060: fix "IME changed" notification uses a wrong field of IME (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 3 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
Index: chrome/browser/chromeos/input_method/input_method_util_unittest.cc
diff --git a/chrome/browser/chromeos/input_method/input_method_util_unittest.cc b/chrome/browser/chromeos/input_method/input_method_util_unittest.cc
index 2b0f8aa8a395d29b4b260ad46f534def81a45dbd..f23f424d08d5d3440927117b25801bc1ac4d3267 100644
--- a/chrome/browser/chromeos/input_method/input_method_util_unittest.cc
+++ b/chrome/browser/chromeos/input_method/input_method_util_unittest.cc
@@ -143,6 +143,26 @@ TEST_F(InputMethodUtilTest, GetInputMethodShortNameTest) {
}
}
+TEST_F(InputMethodUtilTest, GetInputMethodMediumNameTest) {
+ {
+ string16 japanese = UTF8ToUTF16("\xe6\x97\xa5\xe6\x9c\xac\xe8\xaa\x9e");
+ const char* input_method_id[] =
+ { "mozc", "mozc-dv", "mozc-jp", "zinnia-japanese", };
+ const int len = ARRAYSIZE_UNSAFE(input_method_id);
+ for (int i=0; i<len; ++i) {
+ InputMethodDescriptor desc = GetDesc(input_method_id[i], "", "");
+ string16 medium_name = util_.GetInputMethodMediumName(desc);
+ EXPECT_EQ(japanese,medium_name);
+ }
+ }
+ {
+ InputMethodDescriptor desc = GetDesc("xkb:us::eng", "", "");
+ string16 medium_name = util_.GetInputMethodMediumName(desc);
+ string16 short_name = util_.GetInputMethodShortName(desc);
+ EXPECT_EQ(medium_name,short_name);
+ }
+}
+
TEST_F(InputMethodUtilTest, GetInputMethodLongNameTest) {
// For most languages input method or keyboard layout name is returned.
// See below for exceptions.

Powered by Google App Engine
This is Rietveld 408576698