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

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

Issue 212873003: Store the language code for the address in autofill profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixups Created 6 years, 8 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/core/browser/autofill_profile_unittest.cc
diff --git a/components/autofill/core/browser/autofill_profile_unittest.cc b/components/autofill/core/browser/autofill_profile_unittest.cc
index 1da7d585b80a915e2d7c1085ab609b65fd403a66..22b3ba0ef54e13058b30a5dcf49382a2e8714f65 100644
--- a/components/autofill/core/browser/autofill_profile_unittest.cc
+++ b/components/autofill/core/browser/autofill_profile_unittest.cc
@@ -567,8 +567,9 @@ TEST(AutofillProfileTest, OverwriteWithOrAddTo) {
// Create an identical profile except that the new profile:
// (1) Has a different origin,
// (2) Has a different address line 2,
- // (3) Lacks a company name, and
- // (4) Has a different full name variant.
+ // (3) Lacks a company name,
+ // (4) Has a different full name variant, and
+ // (5) Has a language code.
AutofillProfile b = a;
b.set_guid(base::GenerateGUID());
b.set_origin("Chrome settings");
@@ -577,6 +578,7 @@ TEST(AutofillProfileTest, OverwriteWithOrAddTo) {
b.GetRawMultiInfo(NAME_FULL, &names);
names.push_back(ASCIIToUTF16("Marion M. Morrison"));
b.SetRawMultiInfo(NAME_FULL, names);
+ b.set_language_code("en");
a.OverwriteWithOrAddTo(b, "en-US");
EXPECT_EQ("Chrome settings", a.origin());
@@ -587,6 +589,7 @@ TEST(AutofillProfileTest, OverwriteWithOrAddTo) {
EXPECT_EQ(ASCIIToUTF16("Marion Mitchell Morrison"), names[0]);
EXPECT_EQ(ASCIIToUTF16("Marion Morrison"), names[1]);
EXPECT_EQ(ASCIIToUTF16("Marion M. Morrison"), names[2]);
+ EXPECT_EQ("en", a.language_code());
}
TEST(AutofillProfileTest, AssignmentOperator) {
« no previous file with comments | « components/autofill/core/browser/autofill_profile.cc ('k') | components/autofill/core/browser/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698