summaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 06:05:52 +0000
committerjshin@chromium.org <jshin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-24 06:05:52 +0000
commit79157356c6481b608970379e00cded811e00c003 (patch)
tree489a5ed702fd3092c92be49a523246973c62917c /ui
parent36863701c0c60e0edd2262e3a6f700ef53a82542 (diff)
downloadchromium_src-79157356c6481b608970379e00cded811e00c003.zip
chromium_src-79157356c6481b608970379e00cded811e00c003.tar.gz
chromium_src-79157356c6481b608970379e00cded811e00c003.tar.bz2
Pull in ICU 4.6
Adjust the expected result for the display name of es-419. It does not have 'Carribean Islands' any more in the English display name. Also, swap two parameters of EXPECTED_EQ so that the 1st param is 'expected' and the 2nd is 'actual' in two tests in l10n_util_unittest.cc In addition, change icu_string_conversions.cc to fix the failure of ICUStringConversionsTest.ConvertCodepageUTF8. The test uses WideToCodepage that calls u_strFromWCS. Where U_WCHAR_IS_UTF32 is defined, it calls u_strFromUTF32. On Mac, it's not defined because neither __STDC_ISO_10646__ nor _UCS4_ is defined. As a result, wcstombs is called, which doesn't work as we want it to. There are two ways to fix this: - Directly call u_strFromUTF32 on Mac/Linux. What this CL does. - Manually define U_WCHAR_IS_UTF32 in icu's pmac.h, which is done in http://codereview.chromium.org/6578003 We do both to be block wcs*mbs/mbs*wcs from being called in other parts of ICU when U_WCHAR_IS_UTF32 is not defined. BUG=61514 TEST=Build goes fine and tests pass. Review URL: http://codereview.chromium.org/6532030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75854 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui')
-rw-r--r--ui/base/l10n/l10n_util_unittest.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/ui/base/l10n/l10n_util_unittest.cc b/ui/base/l10n/l10n_util_unittest.cc
index 857c87e1..5678314 100644
--- a/ui/base/l10n/l10n_util_unittest.cc
+++ b/ui/base/l10n/l10n_util_unittest.cc
@@ -310,26 +310,26 @@ TEST_F(L10nUtilTest, UpperLower) {
const string16 expected_upper(ASCIIToUTF16("TEXT WITH UPPER & LOWER CASE."));
string16 result = l10n_util::ToLower(mixed);
- EXPECT_EQ(result, expected_lower);
+ EXPECT_EQ(expected_lower, result);
result = l10n_util::ToUpper(mixed);
- EXPECT_EQ(result, expected_upper);
+ EXPECT_EQ(expected_upper, result);
}
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);
- EXPECT_EQ(result, ASCIIToUTF16("Chinese (Simplified Han)"));
+ EXPECT_EQ(ASCIIToUTF16("Chinese (Simplified Han)"), result);
result = l10n_util::GetDisplayNameForLocale("zh-TW", "en", false);
- EXPECT_EQ(result, ASCIIToUTF16("Chinese (Traditional Han)"));
+ EXPECT_EQ(ASCIIToUTF16("Chinese (Traditional Han)"), result);
result = l10n_util::GetDisplayNameForLocale("pt-BR", "en", false);
- EXPECT_EQ(result, ASCIIToUTF16("Portuguese (Brazil)"));
+ EXPECT_EQ(ASCIIToUTF16("Portuguese (Brazil)"), result);
result = l10n_util::GetDisplayNameForLocale("es-419", "en", false);
- EXPECT_EQ(result, ASCIIToUTF16("Spanish (Latin America and the Caribbean)"));
+ EXPECT_EQ(ASCIIToUTF16("Spanish (Latin America)"), result);
}
TEST_F(L10nUtilTest, GetParentLocales) {