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

Unified Diff: base/test/test_suite.cc

Issue 8894007: Added comments to setlocale call. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/test/test_suite.cc
diff --git a/base/test/test_suite.cc b/base/test/test_suite.cc
index 24af4e14c2e71efa001cee5374772d1a7c603741..6739a4e2f7d3df2e8a066744dd9d52e063a5c6b2 100644
--- a/base/test/test_suite.cc
+++ b/base/test/test_suite.cc
@@ -79,6 +79,9 @@ TestSuite::TestSuite(int argc, char** argv) {
CommandLine::Init(argc, argv);
testing::InitGoogleTest(&argc, argv);
#if defined(OS_LINUX) && defined(USE_AURA)
+ // When calling native char conversion functions (e.g wrctomb) we need to
+ // have the locale set. In the absence of such a call the "C" locale is the
+ // default. In the gtk code (below) gtk_init() implicitly sets a locale.
setlocale(LC_ALL, "");
#elif defined(TOOLKIT_USES_GTK)
gtk_init_check(&argc, &argv);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698