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

Unified Diff: chrome/common/l10n_util_unittest.cc

Issue 45054: Block Oriya locale on Windows XP.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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 | « chrome/common/l10n_util_posix.cc ('k') | chrome/common/l10n_util_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/l10n_util_unittest.cc
===================================================================
--- chrome/common/l10n_util_unittest.cc (revision 12453)
+++ chrome/common/l10n_util_unittest.cc (working copy)
@@ -8,6 +8,9 @@
#include "base/file_util.h"
#include "base/path_service.h"
#include "base/string_util.h"
+#if defined(OS_WIN)
+#include "base/win_util.h"
+#endif
#include "chrome/common/chrome_paths.h"
#include "chrome/common/l10n_util.h"
#include "chrome/common/stl_util-inl.h"
@@ -114,6 +117,7 @@
L"he",
L"fil",
L"nb",
+ L"or",
};
#if defined(OS_WIN)
@@ -184,6 +188,21 @@
SetICUDefaultLocale(L"he");
EXPECT_EQ(L"en-US", l10n_util::GetApplicationLocale(L"en"));
+#if defined(OS_WIN)
+ // Oriya should be blocked unless OS is Vista or newer.
+ if (win_util::GetWinVersion() < win_util::WINVERSION_VISTA) {
+ SetICUDefaultLocale(L"or");
+ EXPECT_EQ(L"en-US", l10n_util::GetApplicationLocale(L""));
+ SetICUDefaultLocale(L"en-GB");
+ EXPECT_EQ(L"en-GB", l10n_util::GetApplicationLocale(L"or"));
+ } else {
+ SetICUDefaultLocale(L"or");
+ EXPECT_EQ(L"or", l10n_util::GetApplicationLocale(L""));
+ SetICUDefaultLocale(L"en-GB");
+ EXPECT_EQ(L"or", l10n_util::GetApplicationLocale(L"or"));
+ }
+#endif
+
// Clean up.
PathService::Override(chrome::DIR_LOCALES, orig_locale_dir);
file_util::Delete(new_locale_dir, true);
« no previous file with comments | « chrome/common/l10n_util_posix.cc ('k') | chrome/common/l10n_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698