OLD | NEW |
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 Loading... |
128 // Windows CommandLine::Init ignores argv anyway. | 128 // Windows CommandLine::Init ignores argv anyway. |
129 initialized_command_line_ = CommandLine::Init(argc, NULL); | 129 initialized_command_line_ = CommandLine::Init(argc, NULL); |
130 testing::InitGoogleTest(&argc, argv); | 130 testing::InitGoogleTest(&argc, argv); |
131 testing::InitGoogleMock(&argc, argv); | 131 testing::InitGoogleMock(&argc, argv); |
132 } | 132 } |
133 #endif // defined(OS_WIN) | 133 #endif // defined(OS_WIN) |
134 | 134 |
135 void TestSuite::PreInitialize(bool create_at_exit_manager) { | 135 void TestSuite::PreInitialize(bool create_at_exit_manager) { |
136 #if defined(OS_WIN) | 136 #if defined(OS_WIN) |
137 testing::GTEST_FLAG(catch_exceptions) = false; | 137 testing::GTEST_FLAG(catch_exceptions) = false; |
138 base::TimeTicks::SetNowIsHighResNowIfSupported(); | |
139 #endif | 138 #endif |
140 base::EnableTerminationOnHeapCorruption(); | 139 base::EnableTerminationOnHeapCorruption(); |
141 #if defined(OS_LINUX) && defined(USE_AURA) | 140 #if defined(OS_LINUX) && defined(USE_AURA) |
142 // When calling native char conversion functions (e.g wrctomb) we need to | 141 // When calling native char conversion functions (e.g wrctomb) we need to |
143 // have the locale set. In the absence of such a call the "C" locale is the | 142 // have the locale set. In the absence of such a call the "C" locale is the |
144 // default. In the gtk code (below) gtk_init() implicitly sets a locale. | 143 // default. In the gtk code (below) gtk_init() implicitly sets a locale. |
145 setlocale(LC_ALL, ""); | 144 setlocale(LC_ALL, ""); |
146 #endif // defined(OS_LINUX) && defined(USE_AURA) | 145 #endif // defined(OS_LINUX) && defined(USE_AURA) |
147 | 146 |
148 // On Android, AtExitManager is created in | 147 // On Android, AtExitManager is created in |
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 ResetCommandLine(); | 334 ResetCommandLine(); |
336 #if !defined(OS_IOS) | 335 #if !defined(OS_IOS) |
337 AddTestLauncherResultPrinter(); | 336 AddTestLauncherResultPrinter(); |
338 #endif // !defined(OS_IOS) | 337 #endif // !defined(OS_IOS) |
339 | 338 |
340 TestTimeouts::Initialize(); | 339 TestTimeouts::Initialize(); |
341 } | 340 } |
342 | 341 |
343 void TestSuite::Shutdown() { | 342 void TestSuite::Shutdown() { |
344 } | 343 } |
OLD | NEW |