OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/status/input_method_menu.h" | 5 #include "chrome/browser/chromeos/status/input_method_menu.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/chromeos/cros/cros_library.h" | 8 #include "chrome/browser/chromeos/cros/cros_library.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 "us", "us", "ja"); | 78 "us", "us", "ja"); |
79 EXPECT_EQ(UTF8ToWide("\xe6\x89\x8b"), | 79 EXPECT_EQ(UTF8ToWide("\xe6\x89\x8b"), |
80 InputMethodMenu::GetTextForIndicator(desc)); | 80 InputMethodMenu::GetTextForIndicator(desc)); |
81 } | 81 } |
82 { | 82 { |
83 InputMethodDescriptor desc("pinyin", "Pinyin", "us", "us", "zh-CN"); | 83 InputMethodDescriptor desc("pinyin", "Pinyin", "us", "us", "zh-CN"); |
84 EXPECT_EQ(UTF8ToWide("\xe6\x8b\xbc"), | 84 EXPECT_EQ(UTF8ToWide("\xe6\x8b\xbc"), |
85 InputMethodMenu::GetTextForIndicator(desc)); | 85 InputMethodMenu::GetTextForIndicator(desc)); |
86 } | 86 } |
87 { | 87 { |
| 88 InputMethodDescriptor desc("pinyin-dv", "Pinyin", |
| 89 "us(dvorak)", "us(dvorak)", "zh-CN"); |
| 90 EXPECT_EQ(UTF8ToWide("\xe6\x8b\xbc"), |
| 91 InputMethodMenu::GetTextForIndicator(desc)); |
| 92 } |
| 93 { |
88 InputMethodDescriptor desc("mozc-chewing", "Chewing", "us", "us", "zh-TW"); | 94 InputMethodDescriptor desc("mozc-chewing", "Chewing", "us", "us", "zh-TW"); |
89 EXPECT_EQ(UTF8ToWide("\xe9\x85\xb7"), | 95 EXPECT_EQ(UTF8ToWide("\xe9\x85\xb7"), |
90 InputMethodMenu::GetTextForIndicator(desc)); | 96 InputMethodMenu::GetTextForIndicator(desc)); |
91 } | 97 } |
92 { | 98 { |
93 InputMethodDescriptor desc("m17n:zh:cangjie", "Cangjie", | 99 InputMethodDescriptor desc("m17n:zh:cangjie", "Cangjie", |
94 "us", "us", "zh-TW"); | 100 "us", "us", "zh-TW"); |
95 EXPECT_EQ(UTF8ToWide("\xe5\x80\x89"), | 101 EXPECT_EQ(UTF8ToWide("\xe5\x80\x89"), |
96 InputMethodMenu::GetTextForIndicator(desc)); | 102 InputMethodMenu::GetTextForIndicator(desc)); |
97 } | 103 } |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 InputMethodDescriptor desc("invalid-id", "unregistered string", | 201 InputMethodDescriptor desc("invalid-id", "unregistered string", |
196 "us", "us", "xx"); | 202 "us", "us", "xx"); |
197 // You can safely ignore the "Resouce ID is not found for: unregistered | 203 // You can safely ignore the "Resouce ID is not found for: unregistered |
198 // string" error. | 204 // string" error. |
199 EXPECT_EQ(L"unregistered string", | 205 EXPECT_EQ(L"unregistered string", |
200 InputMethodMenu::GetTextForMenu(desc)); | 206 InputMethodMenu::GetTextForMenu(desc)); |
201 } | 207 } |
202 } | 208 } |
203 | 209 |
204 } // namespace chromeos | 210 } // namespace chromeos |
OLD | NEW |