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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 // Some tests (such as those involving word break iterator) will behave | 331 // Some tests (such as those involving word break iterator) will behave |
332 // differently and fail if we use *POSIX locale. Setting it to en_US here | 332 // differently and fail if we use *POSIX locale. Setting it to en_US here |
333 // does not affect tests that explicitly overrides the locale for testing. | 333 // does not affect tests that explicitly overrides the locale for testing. |
334 // This can be an issue on all platforms other than Windows. | 334 // This can be an issue on all platforms other than Windows. |
335 // TODO(jshin): Should we set the locale via an OS X locale API here? | 335 // TODO(jshin): Should we set the locale via an OS X locale API here? |
336 #if !defined(OS_WIN) | 336 #if !defined(OS_WIN) |
337 #if defined(OS_IOS) | 337 #if defined(OS_IOS) |
338 i18n::SetICUDefaultLocale("en_US"); | 338 i18n::SetICUDefaultLocale("en_US"); |
339 #else | 339 #else |
340 std::string default_locale(uloc_getDefault()); | 340 std::string default_locale(uloc_getDefault()); |
341 if (EndsWith(default_locale, "POSIX", false)) | 341 if (EndsWith(default_locale, "POSIX", CompareCase::INSENSITIVE_ASCII)) |
342 i18n::SetICUDefaultLocale("en_US"); | 342 i18n::SetICUDefaultLocale("en_US"); |
343 #endif | 343 #endif |
344 #endif | 344 #endif |
345 | 345 |
346 CatchMaybeTests(); | 346 CatchMaybeTests(); |
347 ResetCommandLine(); | 347 ResetCommandLine(); |
348 AddTestLauncherResultPrinter(); | 348 AddTestLauncherResultPrinter(); |
349 | 349 |
350 TestTimeouts::Initialize(); | 350 TestTimeouts::Initialize(); |
351 | 351 |
352 trace_to_file_.BeginTracingFromCommandLineOptions(); | 352 trace_to_file_.BeginTracingFromCommandLineOptions(); |
353 } | 353 } |
354 | 354 |
355 void TestSuite::Shutdown() { | 355 void TestSuite::Shutdown() { |
356 } | 356 } |
357 | 357 |
358 } // namespace base | 358 } // namespace base |
OLD | NEW |