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

Side by Side Diff: base/test/test_suite.cc

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/bind.h" 10 #include "base/bind.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 testing::InitGoogleTest(&argc, argv); 128 testing::InitGoogleTest(&argc, argv);
129 testing::InitGoogleMock(&argc, argv); 129 testing::InitGoogleMock(&argc, argv);
130 } 130 }
131 #endif // defined(OS_WIN) 131 #endif // defined(OS_WIN)
132 132
133 void TestSuite::PreInitialize(bool create_at_exit_manager) { 133 void TestSuite::PreInitialize(bool create_at_exit_manager) {
134 #if defined(OS_WIN) 134 #if defined(OS_WIN)
135 testing::GTEST_FLAG(catch_exceptions) = false; 135 testing::GTEST_FLAG(catch_exceptions) = false;
136 #endif 136 #endif
137 base::EnableTerminationOnHeapCorruption(); 137 base::EnableTerminationOnHeapCorruption();
138 #if defined(OS_LINUX) && !defined(OS_ANDROID) 138 #if defined(OS_LINUX) && defined(USE_AURA)
139 // When calling native char conversion functions (e.g wrctomb) we need to 139 // When calling native char conversion functions (e.g wrctomb) we need to
140 // have the locale set. In the absence of such a call the "C" locale is the 140 // have the locale set. In the absence of such a call the "C" locale is the
141 // default. In the gtk code (below) gtk_init() implicitly sets a locale. 141 // default. In the gtk code (below) gtk_init() implicitly sets a locale.
142 setlocale(LC_ALL, ""); 142 setlocale(LC_ALL, "");
143 #endif // defined(OS_LINUX) && !defined(OS_ANDROID) 143 #endif // defined(OS_LINUX) && defined(USE_AURA)
144 144
145 // On Android, AtExitManager is created in 145 // On Android, AtExitManager is created in
146 // testing/android/native_test_wrapper.cc before main() is called. 146 // testing/android/native_test_wrapper.cc before main() is called.
147 #if !defined(OS_ANDROID) 147 #if !defined(OS_ANDROID)
148 if (create_at_exit_manager) 148 if (create_at_exit_manager)
149 at_exit_manager_.reset(new base::AtExitManager); 149 at_exit_manager_.reset(new base::AtExitManager);
150 #endif 150 #endif
151 151
152 // Don't add additional code to this function. Instead add it to 152 // Don't add additional code to this function. Instead add it to
153 // Initialize(). See bug 6436. 153 // Initialize(). See bug 6436.
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 AddTestLauncherResultPrinter(); 330 AddTestLauncherResultPrinter();
331 #endif // !defined(OS_IOS) 331 #endif // !defined(OS_IOS)
332 332
333 TestTimeouts::Initialize(); 333 TestTimeouts::Initialize();
334 334
335 trace_to_file_.BeginTracingFromCommandLineOptions(); 335 trace_to_file_.BeginTracingFromCommandLineOptions();
336 } 336 }
337 337
338 void TestSuite::Shutdown() { 338 void TestSuite::Shutdown() {
339 } 339 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698