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

Unified Diff: base/test/scoped_locale.cc

Issue 987943002: Fix SysStrings unit test failure on Chromecast (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « base/test/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/scoped_locale.cc
diff --git a/base/test/scoped_locale.cc b/base/test/scoped_locale.cc
index 35b3fbe6790ac5175b8dc1fa9c306fe6745bc7cc..69e98fcd91d25e1de99d52a9d8a690d1568bc900 100644
--- a/base/test/scoped_locale.cc
+++ b/base/test/scoped_locale.cc
@@ -12,8 +12,12 @@ namespace base {
ScopedLocale::ScopedLocale(const std::string& locale) {
prev_locale_ = setlocale(LC_ALL, NULL);
+#if defined(SYSTEM_NATIVE_UTF8)
+ EXPECT_TRUE(locale.find("utf-8") != std::string::npos);
Lei Zhang 2015/03/07 01:30:18 I don't think this is right. For instance, on Mac,
+#else
EXPECT_TRUE(setlocale(LC_ALL, locale.c_str()) != NULL) <<
"Failed to set locale: " << locale;
+#endif
}
ScopedLocale::~ScopedLocale() {
« no previous file with comments | « base/test/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698