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

Unified Diff: components/autofill/browser/autofill_profile_unittest.cc

Issue 13697002: Make autofill's Address store country using the country code so that app locale isn't needed for th… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/browser/autofill_profile_unittest.cc
===================================================================
--- components/autofill/browser/autofill_profile_unittest.cc (revision 192389)
+++ components/autofill/browser/autofill_profile_unittest.cc (working copy)
@@ -589,14 +589,6 @@
EXPECT_LT(0, b.Compare(a));
}
-TEST(AutofillProfileTest, CountryCode) {
- AutofillProfile profile;
- EXPECT_EQ(std::string(), profile.CountryCode());
-
- profile.SetCountryCode("US");
- EXPECT_EQ("US", profile.CountryCode());
-}
-
TEST(AutofillProfileTest, MultiValueNames) {
AutofillProfile p;
const string16 kJohnDoe(ASCIIToUTF16("John Doe"));
@@ -740,7 +732,7 @@
AutofillProfile profile;
profile.SetRawInfo(ADDRESS_HOME_COUNTRY, ASCIIToUTF16("CA"));
profile.FillSelectControl(ADDRESS_HOME_COUNTRY, &field);
- EXPECT_EQ(ASCIIToUTF16("Canada"), field.value);
+ EXPECT_EQ(ASCIIToUTF16("CA"), field.value);
Ilya Sherman 2013/04/05 05:18:01 This should remain "Canada". "CA" isn't actually
jam 2013/04/05 06:45:54 Done.
}
TEST(AutofillProfileTest, AddressCountryAbbrev) {
@@ -758,7 +750,7 @@
field.option_contents = options;
AutofillProfile profile;
- profile.SetInfo(ADDRESS_HOME_COUNTRY, ASCIIToUTF16("Canada"), "en-US");
+ profile.SetInfo(ADDRESS_HOME_COUNTRY, ASCIIToUTF16("CA"), "en-US");
Ilya Sherman 2013/04/05 05:18:01 nit: Might as well use SetRawInfo now.
jam 2013/04/05 06:45:54 Done.
profile.FillSelectControl(ADDRESS_HOME_COUNTRY, &field);
EXPECT_EQ(ASCIIToUTF16("CA"), field.value);
}

Powered by Google App Engine
This is Rietveld 408576698