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 112da958cc13b979cd3b0cacae50ac99b7c683a1..fac9b91ca1f860b1037a07476f72c6e722d6bced 100644 |
--- a/components/autofill/core/browser/autofill_profile_unittest.cc |
+++ b/components/autofill/core/browser/autofill_profile_unittest.cc |
@@ -672,6 +672,26 @@ TEST(AutofillProfileTest, AssignmentOperator) { |
EXPECT_TRUE(a == b); |
} |
+TEST(AutofillProfileTest, SetMultiInfo) { |
+ std::vector<base::string16> full_names; |
+ full_names.push_back(ASCIIToUTF16("John Davis")); |
+ full_names.push_back(ASCIIToUTF16("Elouise Davis")); |
+ AutofillProfile p; |
+ p.SetMultiInfo(AutofillType(NAME_FULL), full_names, "en-US"); |
+ |
+ std::vector<base::string16> first_names; |
+ p.GetMultiInfo(AutofillType(NAME_FIRST), "en-US", &first_names); |
+ ASSERT_EQ(2U, first_names.size()); |
+ EXPECT_EQ(ASCIIToUTF16("John"), first_names[0]); |
+ EXPECT_EQ(ASCIIToUTF16("Elouise"), first_names[1]); |
+ |
+ std::vector<base::string16> last_names; |
+ p.GetMultiInfo(AutofillType(NAME_LAST), "en-US", &last_names); |
+ ASSERT_EQ(2U, last_names.size()); |
+ EXPECT_EQ(ASCIIToUTF16("Davis"), last_names[0]); |
+ EXPECT_EQ(ASCIIToUTF16("Davis"), last_names[1]); |
+} |
+ |
TEST(AutofillProfileTest, Copy) { |
AutofillProfile a(base::GenerateGUID(), "https://www.example.com/"); |
test::SetProfileInfo(&a, "Marion", "Mitchell", "Morrison", |