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/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 | 89 |
90 TestSuite::~TestSuite() { | 90 TestSuite::~TestSuite() { |
91 if (initialized_command_line_) | 91 if (initialized_command_line_) |
92 CommandLine::Reset(); | 92 CommandLine::Reset(); |
93 } | 93 } |
94 | 94 |
95 void TestSuite::PreInitialize(int argc, char** argv, | 95 void TestSuite::PreInitialize(int argc, char** argv, |
96 bool create_at_exit_manager) { | 96 bool create_at_exit_manager) { |
97 #if defined(OS_WIN) | 97 #if defined(OS_WIN) |
98 testing::GTEST_FLAG(catch_exceptions) = false; | 98 testing::GTEST_FLAG(catch_exceptions) = false; |
99 base::TimeTicks::SetNowIsHighResNowIfSupported(); | |
100 #endif | 99 #endif |
101 base::EnableTerminationOnHeapCorruption(); | 100 base::EnableTerminationOnHeapCorruption(); |
102 initialized_command_line_ = CommandLine::Init(argc, argv); | 101 initialized_command_line_ = CommandLine::Init(argc, argv); |
103 testing::InitGoogleTest(&argc, argv); | 102 testing::InitGoogleTest(&argc, argv); |
104 #if defined(OS_LINUX) && defined(USE_AURA) | 103 #if defined(OS_LINUX) && defined(USE_AURA) |
105 // When calling native char conversion functions (e.g wrctomb) we need to | 104 // When calling native char conversion functions (e.g wrctomb) we need to |
106 // have the locale set. In the absence of such a call the "C" locale is the | 105 // have the locale set. In the absence of such a call the "C" locale is the |
107 // default. In the gtk code (below) gtk_init() implicitly sets a locale. | 106 // default. In the gtk code (below) gtk_init() implicitly sets a locale. |
108 setlocale(LC_ALL, ""); | 107 setlocale(LC_ALL, ""); |
109 #elif defined(TOOLKIT_GTK) | 108 #elif defined(TOOLKIT_GTK) |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
250 icu_util::Initialize(); | 249 icu_util::Initialize(); |
251 | 250 |
252 CatchMaybeTests(); | 251 CatchMaybeTests(); |
253 ResetCommandLine(); | 252 ResetCommandLine(); |
254 | 253 |
255 TestTimeouts::Initialize(); | 254 TestTimeouts::Initialize(); |
256 } | 255 } |
257 | 256 |
258 void TestSuite::Shutdown() { | 257 void TestSuite::Shutdown() { |
259 } | 258 } |
OLD | NEW |