Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: ui/base/l10n/l10n_util_unittest.cc

Issue 971653005: Roll ICU to eda9e75b to add the Windows data dll (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix mo display name Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 // synonyms. 446 // synonyms.
447 result = l10n_util::GetDisplayNameForLocale("tl", "en", false); 447 result = l10n_util::GetDisplayNameForLocale("tl", "en", false);
448 EXPECT_EQ(l10n_util::GetDisplayNameForLocale("fil", "en", false), result); 448 EXPECT_EQ(l10n_util::GetDisplayNameForLocale("fil", "en", false), result);
449 449
450 result = l10n_util::GetDisplayNameForLocale("pt-BR", "en", false); 450 result = l10n_util::GetDisplayNameForLocale("pt-BR", "en", false);
451 EXPECT_EQ(ASCIIToUTF16("Portuguese (Brazil)"), result); 451 EXPECT_EQ(ASCIIToUTF16("Portuguese (Brazil)"), result);
452 452
453 result = l10n_util::GetDisplayNameForLocale("es-419", "en", false); 453 result = l10n_util::GetDisplayNameForLocale("es-419", "en", false);
454 EXPECT_EQ(ASCIIToUTF16("Spanish (Latin America)"), result); 454 EXPECT_EQ(ASCIIToUTF16("Spanish (Latin America)"), result);
455 455
456 result = l10n_util::GetDisplayNameForLocale("mo", "en", false);
457 EXPECT_EQ(l10n_util::GetDisplayNameForLocale("ro-MD", "en", false), result);
458
456 result = l10n_util::GetDisplayNameForLocale("-BR", "en", false); 459 result = l10n_util::GetDisplayNameForLocale("-BR", "en", false);
457 EXPECT_EQ(ASCIIToUTF16("Brazil"), result); 460 EXPECT_EQ(ASCIIToUTF16("Brazil"), result);
458 461
459 result = l10n_util::GetDisplayNameForLocale("xyz-xyz", "en", false); 462 result = l10n_util::GetDisplayNameForLocale("xyz-xyz", "en", false);
460 EXPECT_EQ(ASCIIToUTF16("xyz (XYZ)"), result); 463 EXPECT_EQ(ASCIIToUTF16("xyz (XYZ)"), result);
461 464
462 // Make sure that en-GB locale has the corect display names. 465 // Make sure that en-GB locale has the corect display names.
463 result = l10n_util::GetDisplayNameForLocale("en", "en-GB", false); 466 result = l10n_util::GetDisplayNameForLocale("en", "en-GB", false);
464 EXPECT_EQ(ASCIIToUTF16("English"), result); 467 EXPECT_EQ(ASCIIToUTF16("English"), result);
465 result = l10n_util::GetDisplayNameForLocale("es-419", "en-GB", false); 468 result = l10n_util::GetDisplayNameForLocale("es-419", "en-GB", false);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("Latin")); 566 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("Latin"));
564 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("German")); 567 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("German"));
565 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("pt--BR")); 568 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("pt--BR"));
566 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("sl-macedonia")); 569 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("sl-macedonia"));
567 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("@")); 570 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("@"));
568 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@")); 571 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@"));
569 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@x")); 572 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@x"));
570 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@x=")); 573 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@x="));
571 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@=y")); 574 EXPECT_FALSE(l10n_util::IsValidLocaleSyntax("en-US@=y"));
572 } 575 }
OLDNEW
« no previous file with comments | « ui/base/l10n/l10n_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698