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

Side by Side Diff: chrome/browser/chromeos/status/input_method_menu_unittest.cc

Issue 7044044: Add pinyin-dv support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review Created 9 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/input_method_menu.cc ('k') | chrome/browser/resources/options/language_options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698