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

Unified Diff: ui/base/l10n/l10n_util_unittest.cc

Issue 10380018: Revert 135484 - Use Android API for GetDisplayNameForLocale(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | ui/ui_unittests.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/l10n_util_unittest.cc
===================================================================
--- ui/base/l10n/l10n_util_unittest.cc (revision 135489)
+++ ui/base/l10n/l10n_util_unittest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -303,7 +303,7 @@
STLDeleteElements(&strings);
}
-TEST_F(L10nUtilTest, GetDisplayNameForLocale) {
+TEST_F(L10nUtilTest, LocaleDisplayName) {
// TODO(jungshik): Make this test more extensive.
// Test zh-CN and zh-TW are treated as zh-Hans and zh-Hant.
string16 result = l10n_util::GetDisplayNameForLocale("zh-CN", "en", false);
@@ -318,12 +318,6 @@
result = l10n_util::GetDisplayNameForLocale("es-419", "en", false);
EXPECT_EQ(ASCIIToUTF16("Spanish (Latin America)"), result);
- result = l10n_util::GetDisplayNameForLocale("-BR", "en", false);
- EXPECT_EQ(ASCIIToUTF16("Brazil"), result);
-
- result = l10n_util::GetDisplayNameForLocale("xyz-xyz", "en", false);
- EXPECT_EQ(ASCIIToUTF16("xyz (XYZ)"), result);
-
// ToUpper and ToLower should work with embedded NULLs.
const size_t length_with_null = 4;
char16 buf_with_null[length_with_null] = { 0, 'a', 0, 'b' };
@@ -340,17 +334,6 @@
lower_with_null[2] == 0 && lower_with_null[3] == 'b');
}
-TEST_F(L10nUtilTest, GetDisplayNameForCountry) {
- string16 result = l10n_util::GetDisplayNameForCountry("BR", "en");
- EXPECT_EQ(ASCIIToUTF16("Brazil"), result);
-
- result = l10n_util::GetDisplayNameForCountry("419", "en");
- EXPECT_EQ(ASCIIToUTF16("Latin America"), result);
-
- result = l10n_util::GetDisplayNameForCountry("xyz", "en");
- EXPECT_EQ(ASCIIToUTF16("XYZ"), result);
-}
-
TEST_F(L10nUtilTest, GetParentLocales) {
std::vector<std::string> locales;
const std::string top_locale("sr_Cyrl_RS");
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | ui/ui_unittests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698