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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/test/test_suite.h" 5 #include "base/test/test_suite.h"
6 6
7 #include "base/at_exit.h" 7 #include "base/at_exit.h"
8 #include "base/base_paths.h" 8 #include "base/base_paths.h"
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const char TestSuite::kStrictFailureHandling[] = "strict_failure_handling"; 72 const char TestSuite::kStrictFailureHandling[] = "strict_failure_handling";
73 73
74 TestSuite::TestSuite(int argc, char** argv) { 74 TestSuite::TestSuite(int argc, char** argv) {
75 #if defined(OS_WIN) 75 #if defined(OS_WIN)
76 testing::GTEST_FLAG(catch_exceptions) = false; 76 testing::GTEST_FLAG(catch_exceptions) = false;
77 #endif 77 #endif
78 base::EnableTerminationOnHeapCorruption(); 78 base::EnableTerminationOnHeapCorruption();
79 CommandLine::Init(argc, argv); 79 CommandLine::Init(argc, argv);
80 testing::InitGoogleTest(&argc, argv); 80 testing::InitGoogleTest(&argc, argv);
81 #if defined(OS_LINUX) && defined(USE_AURA) 81 #if defined(OS_LINUX) && defined(USE_AURA)
82 // When calling native char conversion functions (e.g wrctomb) we need to
83 // have the locale set. In the absence of such a call the "C" locale is the
84 // default. In the gtk code (below) gtk_init() implicitly sets a locale.
82 setlocale(LC_ALL, ""); 85 setlocale(LC_ALL, "");
83 #elif defined(TOOLKIT_USES_GTK) 86 #elif defined(TOOLKIT_USES_GTK)
84 gtk_init_check(&argc, &argv); 87 gtk_init_check(&argc, &argv);
85 #endif // defined(TOOLKIT_USES_GTK) 88 #endif // defined(TOOLKIT_USES_GTK)
86 // Don't add additional code to this constructor. Instead add it to 89 // Don't add additional code to this constructor. Instead add it to
87 // Initialize(). See bug 6436. 90 // Initialize(). See bug 6436.
88 } 91 }
89 92
90 TestSuite::~TestSuite() { 93 TestSuite::~TestSuite() {
91 CommandLine::Reset(); 94 CommandLine::Reset();
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 #endif 260 #endif
258 261
259 CatchMaybeTests(); 262 CatchMaybeTests();
260 ResetCommandLine(); 263 ResetCommandLine();
261 264
262 TestTimeouts::Initialize(); 265 TestTimeouts::Initialize();
263 } 266 }
264 267
265 void TestSuite::Shutdown() { 268 void TestSuite::Shutdown() {
266 } 269 }
OLDNEW
« 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