| Index: components/autofill/core/browser/autofill_data_util_unittest.cc
|
| diff --git a/components/autofill/core/browser/autofill_data_util_unittest.cc b/components/autofill/core/browser/autofill_data_util_unittest.cc
|
| index ebed1f798d257b7bc3d93717137e1e2e09c367d0..707ac4925f1c69b15012ab4c4aa6e54398fb8212 100644
|
| --- a/components/autofill/core/browser/autofill_data_util_unittest.cc
|
| +++ b/components/autofill/core/browser/autofill_data_util_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include "components/autofill/core/browser/autofill_data_util.h"
|
|
|
| #include "base/strings/utf_string_conversions.h"
|
| +#include "components/autofill/core/browser/autofill_test_utils.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace autofill {
|
| @@ -42,5 +43,26 @@ TEST(AutofillDataUtilTest, SplitName) {
|
| }
|
| }
|
|
|
| +TEST(AutofillDataUtilTest, ProfileMatchesFullName) {
|
| + autofill::AutofillProfile profile;
|
| + autofill::test::SetProfileInfo(
|
| + &profile, "First", "Middle", "Last", "fml@example.com", "Acme inc",
|
| + "123 Main", "Apt 2", "Laredo", "TX", "77300", "US", "832-555-1000");
|
| +
|
| + EXPECT_TRUE(ProfileMatchesFullName(base::UTF8ToUTF16("First Last"), profile));
|
| +
|
| + EXPECT_TRUE(
|
| + ProfileMatchesFullName(base::UTF8ToUTF16("First Middle Last"), profile));
|
| +
|
| + EXPECT_TRUE(
|
| + ProfileMatchesFullName(base::UTF8ToUTF16("First M Last"), profile));
|
| +
|
| + EXPECT_TRUE(
|
| + ProfileMatchesFullName(base::UTF8ToUTF16("First M. Last"), profile));
|
| +
|
| + EXPECT_FALSE(
|
| + ProfileMatchesFullName(base::UTF8ToUTF16("Kirby Puckett"), profile));
|
| +}
|
| +
|
| } // namespace data_util
|
| } // namespace autofill
|
|
|