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