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

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

Issue 7744039: Switch ChromeTestSuite to the same convention as ContentTestSuite: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixing Created 9 years, 4 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 "chrome/test/base/testing_browser_process.h" 9 #include "chrome/test/base/testing_browser_process.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 { 105 {
106 InputMethodDescriptor desc = GetDesc("m17n:zh:quick", "us", "zh-TW"); 106 InputMethodDescriptor desc = GetDesc("m17n:zh:quick", "us", "zh-TW");
107 EXPECT_EQ(UTF8ToWide("\xe9\x80\x9f"), 107 EXPECT_EQ(UTF8ToWide("\xe9\x80\x9f"),
108 InputMethodMenu::GetTextForIndicator(desc)); 108 InputMethodMenu::GetTextForIndicator(desc));
109 } 109 }
110 } 110 }
111 111
112 112
113 // Test whether the function returns language name for non-ambiguous languages. 113 // Test whether the function returns language name for non-ambiguous languages.
114 TEST(InputMethodMenuTest, GetTextForMenuTest) { 114 TEST(InputMethodMenuTest, GetTextForMenuTest) {
115 ScopedTestingBrowserProcess browser_process;
116 // For most languages input method or keyboard layout name is returned. 115 // For most languages input method or keyboard layout name is returned.
117 // See below for exceptions. 116 // See below for exceptions.
118 { 117 {
119 InputMethodDescriptor desc = GetDesc("m17n:fa:isiri", "us", "fa"); 118 InputMethodDescriptor desc = GetDesc("m17n:fa:isiri", "us", "fa");
120 EXPECT_EQ(L"Persian input method (ISIRI 2901 layout)", 119 EXPECT_EQ(L"Persian input method (ISIRI 2901 layout)",
121 InputMethodMenu::GetTextForMenu(desc)); 120 InputMethodMenu::GetTextForMenu(desc));
122 } 121 }
123 { 122 {
124 InputMethodDescriptor desc = GetDesc("mozc-hangul", "us", "ko"); 123 InputMethodDescriptor desc = GetDesc("mozc-hangul", "us", "ko");
125 EXPECT_EQ(L"Korean input method", 124 EXPECT_EQ(L"Korean input method",
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 { 202 {
204 InputMethodDescriptor desc = GetDesc("invalid-id", "us", "xx"); 203 InputMethodDescriptor desc = GetDesc("invalid-id", "us", "xx");
205 // You can safely ignore the "Resouce ID is not found for: invalid-id" 204 // You can safely ignore the "Resouce ID is not found for: invalid-id"
206 // error. 205 // error.
207 EXPECT_EQ(L"invalid-id", 206 EXPECT_EQ(L"invalid-id",
208 InputMethodMenu::GetTextForMenu(desc)); 207 InputMethodMenu::GetTextForMenu(desc));
209 } 208 }
210 } 209 }
211 210
212 } // namespace chromeos 211 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698