autofill: Rename AutoFillCountry to AutofillCountry.
BUG=72758
TEST=compiled locally and trybots
Review URL: http://codereview.chromium.org/6598058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76355 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/autofill/autofill_country_unittest.cc b/chrome/browser/autofill/autofill_country_unittest.cc
index 5783c8a0..e5406333 100644
--- a/chrome/browser/autofill/autofill_country_unittest.cc
+++ b/chrome/browser/autofill/autofill_country_unittest.cc
@@ -10,74 +10,74 @@
#include "testing/gtest/include/gtest/gtest.h"
// Test the constructor and accessors
-TEST(AutoFillCountryTest, AutoFillCountry) {
- AutoFillCountry united_states_en("US", "en_US");
+TEST(AutofillCountryTest, AutofillCountry) {
+ AutofillCountry united_states_en("US", "en_US");
EXPECT_EQ("US", united_states_en.country_code());
EXPECT_EQ(ASCIIToUTF16("United States"), united_states_en.name());
EXPECT_EQ(ASCIIToUTF16("Zip code"), united_states_en.postal_code_label());
EXPECT_EQ(ASCIIToUTF16("State"), united_states_en.state_label());
- AutoFillCountry united_states_es("US", "es");
+ AutofillCountry united_states_es("US", "es");
EXPECT_EQ("US", united_states_es.country_code());
EXPECT_EQ(ASCIIToUTF16("Estados Unidos"), united_states_es.name());
- AutoFillCountry canada_en("CA", "en_US");
+ AutofillCountry canada_en("CA", "en_US");
EXPECT_EQ("CA", canada_en.country_code());
EXPECT_EQ(ASCIIToUTF16("Canada"), canada_en.name());
EXPECT_EQ(ASCIIToUTF16("Postal code"), canada_en.postal_code_label());
EXPECT_EQ(ASCIIToUTF16("Province"), canada_en.state_label());
- AutoFillCountry canada_hu("CA", "hu");
+ AutofillCountry canada_hu("CA", "hu");
EXPECT_EQ("CA", canada_hu.country_code());
EXPECT_EQ(ASCIIToUTF16("Kanada"), canada_hu.name());
}
// Test locale to country code mapping.
-TEST(AutoFillCountryTest, CountryCodeForLocale) {
- EXPECT_EQ("US", AutoFillCountry::CountryCodeForLocale("en_US"));
- EXPECT_EQ("CA", AutoFillCountry::CountryCodeForLocale("fr_CA"));
- EXPECT_EQ("FR", AutoFillCountry::CountryCodeForLocale("fr"));
- EXPECT_EQ("US", AutoFillCountry::CountryCodeForLocale("Unknown"));
+TEST(AutofillCountryTest, CountryCodeForLocale) {
+ EXPECT_EQ("US", AutofillCountry::CountryCodeForLocale("en_US"));
+ EXPECT_EQ("CA", AutofillCountry::CountryCodeForLocale("fr_CA"));
+ EXPECT_EQ("FR", AutofillCountry::CountryCodeForLocale("fr"));
+ EXPECT_EQ("US", AutofillCountry::CountryCodeForLocale("Unknown"));
}
// Test mapping of localized country names to country codes.
-TEST(AutoFillCountryTest, GetCountryCode) {
+TEST(AutofillCountryTest, GetCountryCode) {
// Basic mapping
- EXPECT_EQ("US", AutoFillCountry::GetCountryCode(ASCIIToUTF16("United States"),
+ EXPECT_EQ("US", AutofillCountry::GetCountryCode(ASCIIToUTF16("United States"),
"en_US"));
- EXPECT_EQ("CA", AutoFillCountry::GetCountryCode(ASCIIToUTF16("Canada"),
+ EXPECT_EQ("CA", AutofillCountry::GetCountryCode(ASCIIToUTF16("Canada"),
"en_US"));
// Case-insensitive mapping
- EXPECT_EQ("US", AutoFillCountry::GetCountryCode(ASCIIToUTF16("united states"),
+ EXPECT_EQ("US", AutofillCountry::GetCountryCode(ASCIIToUTF16("united states"),
"en_US"));
// Country codes should map to themselves, independent of locale.
- EXPECT_EQ("US", AutoFillCountry::GetCountryCode(ASCIIToUTF16("US"), "en_US"));
- EXPECT_EQ("HU", AutoFillCountry::GetCountryCode(ASCIIToUTF16("hu"), "en_US"));
- EXPECT_EQ("CA", AutoFillCountry::GetCountryCode(ASCIIToUTF16("CA"), "fr_CA"));
- EXPECT_EQ("MX", AutoFillCountry::GetCountryCode(ASCIIToUTF16("mx"), "fr_CA"));
+ EXPECT_EQ("US", AutofillCountry::GetCountryCode(ASCIIToUTF16("US"), "en_US"));
+ EXPECT_EQ("HU", AutofillCountry::GetCountryCode(ASCIIToUTF16("hu"), "en_US"));
+ EXPECT_EQ("CA", AutofillCountry::GetCountryCode(ASCIIToUTF16("CA"), "fr_CA"));
+ EXPECT_EQ("MX", AutofillCountry::GetCountryCode(ASCIIToUTF16("mx"), "fr_CA"));
// Basic synonyms
EXPECT_EQ("US",
- AutoFillCountry::GetCountryCode(
+ AutofillCountry::GetCountryCode(
ASCIIToUTF16("United States of America"), "en_US"));
- EXPECT_EQ("US", AutoFillCountry::GetCountryCode(ASCIIToUTF16("USA"),
+ EXPECT_EQ("US", AutofillCountry::GetCountryCode(ASCIIToUTF16("USA"),
"en_US"));
// Other locales
EXPECT_EQ("US",
- AutoFillCountry::GetCountryCode(ASCIIToUTF16("Estados Unidos"),
+ AutofillCountry::GetCountryCode(ASCIIToUTF16("Estados Unidos"),
"es"));
- EXPECT_EQ("IT", AutoFillCountry::GetCountryCode(ASCIIToUTF16("Italia"),
+ EXPECT_EQ("IT", AutofillCountry::GetCountryCode(ASCIIToUTF16("Italia"),
"it"));
- EXPECT_EQ("DE", AutoFillCountry::GetCountryCode(ASCIIToUTF16("duitsland"),
+ EXPECT_EQ("DE", AutofillCountry::GetCountryCode(ASCIIToUTF16("duitsland"),
"nl"));
// Should fall back to "en_US" locale if all else fails.
- EXPECT_EQ("US", AutoFillCountry::GetCountryCode(ASCIIToUTF16("United States"),
+ EXPECT_EQ("US", AutofillCountry::GetCountryCode(ASCIIToUTF16("United States"),
"es"));
- EXPECT_EQ("US", AutoFillCountry::GetCountryCode(ASCIIToUTF16("united states"),
+ EXPECT_EQ("US", AutofillCountry::GetCountryCode(ASCIIToUTF16("united states"),
"es"));
- EXPECT_EQ("US", AutoFillCountry::GetCountryCode(ASCIIToUTF16("USA"), "es"));
+ EXPECT_EQ("US", AutofillCountry::GetCountryCode(ASCIIToUTF16("USA"), "es"));
}