| 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 "build/build_config.h" | 5 #include "build/build_config.h" |
| 6 | 6 |
| 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
| 8 #include <cstdlib> | 8 #include <cstdlib> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/environment.h" | 12 #include "base/environment.h" |
| 13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
| 14 #include "base/i18n/case_conversion.h" | 14 #include "base/i18n/case_conversion.h" |
| 15 #include "base/i18n/rtl.h" | 15 #include "base/i18n/rtl.h" |
| 16 #include "base/path_service.h" | 16 #include "base/path_service.h" |
| 17 #include "base/stl_util.h" | 17 #include "base/stl_util.h" |
| 18 #include "base/string_util.h" | 18 #include "base/string_util.h" |
| 19 #include "base/test/scoped_path_override.h" | 19 #include "base/test/scoped_path_override.h" |
| 20 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
| 21 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
| 22 #include "testing/platform_test.h" | 22 #include "testing/platform_test.h" |
| 23 #include "third_party/icu/public/common/unicode/locid.h" |
| 23 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
| 24 #include "ui/base/l10n/l10n_util_collator.h" | 25 #include "ui/base/l10n/l10n_util_collator.h" |
| 25 #include "ui/base/ui_base_paths.h" | 26 #include "ui/base/ui_base_paths.h" |
| 26 #include "unicode/locid.h" | |
| 27 | 27 |
| 28 #if defined(OS_WIN) | 28 #if defined(OS_WIN) |
| 29 #include "base/win/windows_version.h" | 29 #include "base/win/windows_version.h" |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 #if !defined(OS_MACOSX) | 32 #if !defined(OS_MACOSX) |
| 33 #include "ui/base/test/data/resource.h" | 33 #include "ui/base/test/data/resource.h" |
| 34 #endif | 34 #endif |
| 35 | 35 |
| 36 namespace { | 36 namespace { |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("Latin")); | 455 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("Latin")); |
| 456 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("German")); | 456 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("German")); |
| 457 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("pt--BR")); | 457 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("pt--BR")); |
| 458 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("sl-macedonia")); | 458 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("sl-macedonia")); |
| 459 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("@")); | 459 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("@")); |
| 460 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@")); | 460 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@")); |
| 461 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@x")); | 461 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@x")); |
| 462 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@x=")); | 462 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@x=")); |
| 463 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@=y")); | 463 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@=y")); |
| 464 } | 464 } |
| OLD | NEW |