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

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

Issue 5904003: Support US Colemak keyboard layout (Chrome part) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review fixes Created 10 years 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
« no previous file with comments | « chrome/browser/chromeos/status/input_method_menu.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace chromeos { 10 namespace chromeos {
(...skipping 17 matching lines...) Expand all
28 // Upper-case string of the unknown language code, "xx", should be returned. 28 // Upper-case string of the unknown language code, "xx", should be returned.
29 EXPECT_EQ(L"XX", InputMethodMenu::GetTextForIndicator(desc)); 29 EXPECT_EQ(L"XX", InputMethodMenu::GetTextForIndicator(desc));
30 } 30 }
31 31
32 // Test special cases. 32 // Test special cases.
33 { 33 {
34 InputMethodDescriptor desc("xkb:us:dvorak:eng", "Dvorak", "us", "eng"); 34 InputMethodDescriptor desc("xkb:us:dvorak:eng", "Dvorak", "us", "eng");
35 EXPECT_EQ(L"DV", InputMethodMenu::GetTextForIndicator(desc)); 35 EXPECT_EQ(L"DV", InputMethodMenu::GetTextForIndicator(desc));
36 } 36 }
37 { 37 {
38 InputMethodDescriptor desc("xkb:us:colemak:eng", "Colemak", "us", "eng");
39 EXPECT_EQ(L"CO", InputMethodMenu::GetTextForIndicator(desc));
40 }
41 {
38 InputMethodDescriptor desc("xkb:us:altgr-intl:eng", "US extd", "us", "eng"); 42 InputMethodDescriptor desc("xkb:us:altgr-intl:eng", "US extd", "us", "eng");
39 EXPECT_EQ(L"EXTD", InputMethodMenu::GetTextForIndicator(desc)); 43 EXPECT_EQ(L"EXTD", InputMethodMenu::GetTextForIndicator(desc));
40 } 44 }
41 { 45 {
42 InputMethodDescriptor desc("xkb:us:intl:eng", "US intl", "us", "eng"); 46 InputMethodDescriptor desc("xkb:us:intl:eng", "US intl", "us", "eng");
43 EXPECT_EQ(L"INTL", InputMethodMenu::GetTextForIndicator(desc)); 47 EXPECT_EQ(L"INTL", InputMethodMenu::GetTextForIndicator(desc));
44 } 48 }
45 { 49 {
46 InputMethodDescriptor desc("mozc", "Mozc", "us", "ja"); 50 InputMethodDescriptor desc("mozc", "Mozc", "us", "ja");
47 EXPECT_EQ(UTF8ToWide("\xe3\x81\x82"), 51 EXPECT_EQ(UTF8ToWide("\xe3\x81\x82"),
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 { 161 {
158 InputMethodDescriptor desc("invalid-id", "unregistered string", "us", "xx"); 162 InputMethodDescriptor desc("invalid-id", "unregistered string", "us", "xx");
159 // You can safely ignore the "Resouce ID is not found for: unregistered 163 // You can safely ignore the "Resouce ID is not found for: unregistered
160 // string" error. 164 // string" error.
161 EXPECT_EQ(L"unregistered string", 165 EXPECT_EQ(L"unregistered string",
162 InputMethodMenu::GetTextForMenu(desc)); 166 InputMethodMenu::GetTextForMenu(desc));
163 } 167 }
164 } 168 }
165 169
166 } // namespace chromeos 170 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/input_method_menu.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698