OLD | NEW |
---|---|
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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 | 71 |
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(TOOLKIT_USES_GTK) | 81 #if defined(OS_LINUX) && defined(USE_AURA) |
82 setlocale(LC_ALL, ""); | |
Paweł Hajdan Jr.
2011/12/09 11:27:55
Please add comment - why is it here?
| |
83 #elif defined(TOOLKIT_USES_GTK) | |
82 gtk_init_check(&argc, &argv); | 84 gtk_init_check(&argc, &argv); |
83 #endif // defined(TOOLKIT_USES_GTK) | 85 #endif // defined(TOOLKIT_USES_GTK) |
84 // Don't add additional code to this constructor. Instead add it to | 86 // Don't add additional code to this constructor. Instead add it to |
85 // Initialize(). See bug 6436. | 87 // Initialize(). See bug 6436. |
86 } | 88 } |
87 | 89 |
88 TestSuite::~TestSuite() { | 90 TestSuite::~TestSuite() { |
89 CommandLine::Reset(); | 91 CommandLine::Reset(); |
90 } | 92 } |
91 | 93 |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
255 #endif | 257 #endif |
256 | 258 |
257 CatchMaybeTests(); | 259 CatchMaybeTests(); |
258 ResetCommandLine(); | 260 ResetCommandLine(); |
259 | 261 |
260 TestTimeouts::Initialize(); | 262 TestTimeouts::Initialize(); |
261 } | 263 } |
262 | 264 |
263 void TestSuite::Shutdown() { | 265 void TestSuite::Shutdown() { |
264 } | 266 } |
OLD | NEW |