#include "components/autofill/core/browser/form_parsing/name_field_parser.h"
#include <memory>
#include <vector>
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/form_parsing/parsing_test_utils.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_regex_constants.h"
#include "components/autofill/core/common/autofill_regexes.h"
#include "components/autofill/core/common/form_field_data.h"
namespace autofill {
namespace {
bool MatchesPattern(std::u16string_view input, std::string_view pattern_name) { … }
class NameFieldParserTest
: public FormFieldParserTestBase,
public testing::TestWithParam<PatternProviderFeatureState> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(NameFieldParserTest, FirstMiddleLast) { … }
TEST_P(NameFieldParserTest, FirstMiddleLast2) { … }
TEST_P(NameFieldParserTest, HonorificPrefixFirstLast) { … }
TEST_P(NameFieldParserTest, FirstLast) { … }
TEST_P(NameFieldParserTest, NameSurname) { … }
TEST_P(NameFieldParserTest, NameSurnameWithMiddleName) { … }
TEST_P(NameFieldParserTest, NameSurname_DE) { … }
TEST_P(NameFieldParserTest, FirstLast2) { … }
TEST_P(NameFieldParserTest, FirstLastMiddleWithSpaces) { … }
TEST_P(NameFieldParserTest, FirstLastEmpty) { … }
TEST_P(NameFieldParserTest, FirstMiddleLastEmpty) { … }
TEST_P(NameFieldParserTest, MiddleInitial) { … }
TEST_P(NameFieldParserTest, MiddleInitialNoLastName) { … }
TEST_P(NameFieldParserTest, HonorificPrefixAndFirstNameAndHispanicLastNames) { … }
TEST_P(NameFieldParserTest,
FirstNameAndOptionalMiddleNameAndHispanicLastNames) { … }
TEST_P(NameFieldParserTest, MiddleInitialAtEnd) { … }
TEST_P(NameFieldParserTest, HispanicLastNameRegexConverage) { … }
TEST_P(NameFieldParserTest, NotAddressName) { … }
TEST_P(NameFieldParserTest, ContactNameFull) { … }
}
}