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

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

Issue 7086017: Fix the loading of ca@valencia.pak, which is available in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/l10n/l10n_util_unittest.cc
diff --git a/ui/base/l10n/l10n_util_unittest.cc b/ui/base/l10n/l10n_util_unittest.cc
index 8b24181a6a591a1c5bbfe975ea792131e6ac0078..1ffd36fb6cba46c3f736fee0d9a910e3bfb316d5 100644
--- a/ui/base/l10n/l10n_util_unittest.cc
+++ b/ui/base/l10n/l10n_util_unittest.cc
@@ -141,6 +141,8 @@ TEST_F(L10nUtilTest, GetAppLocale) {
"fil",
"nb",
"am",
+ "ca",
+ "ca@valencia",
};
#if defined(OS_WIN)
@@ -194,6 +196,21 @@ TEST_F(L10nUtilTest, GetAppLocale) {
env->UnSetVar("LC_MESSAGES");
EXPECT_EQ("nb", l10n_util::GetApplicationLocale(""));
env->UnSetVar("LANG");
+
+ SetDefaultLocaleForTest("ca", env.get());
+ EXPECT_EQ("ca", l10n_util::GetApplicationLocale(""));
+
+ SetDefaultLocaleForTest("ca-ES", env.get());
+ EXPECT_EQ("ca", l10n_util::GetApplicationLocale(""));
+
+ SetDefaultLocaleForTest("ca@valencia", env.get());
+ EXPECT_EQ("ca@valencia", l10n_util::GetApplicationLocale(""));
+
+ SetDefaultLocaleForTest("ca_ES@valencia", env.get());
+ EXPECT_EQ("ca@valencia", l10n_util::GetApplicationLocale(""));
+
+ SetDefaultLocaleForTest("ca_ES.UTF8@valencia", env.get());
+ EXPECT_EQ("ca@valencia", l10n_util::GetApplicationLocale(""));
#endif // defined(OS_POSIX) && !defined(OS_CHROMEOS)
SetDefaultLocaleForTest("en-US", env.get());
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698