chromium/components/autofill/core/browser/form_parsing/name_field_parser_unittest.cc

// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 that a field for a honorific title is parsed correctly.
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) {}

// Tests that a website with a first and second surname field is parsed
// correctly.
TEST_P(NameFieldParserTest, HonorificPrefixAndFirstNameAndHispanicLastNames) {}

// Tests that a website with a first and second surname field is parsed
// correctly.
TEST_P(NameFieldParserTest,
       FirstNameAndOptionalMiddleNameAndHispanicLastNames) {}

// This case is from the dell.com checkout page.  The middle initial "mi" string
// came at the end following other descriptive text.  http://crbug.com/45123.
TEST_P(NameFieldParserTest, MiddleInitialAtEnd) {}

// Test the coverage of all found strings for first and second last names.
TEST_P(NameFieldParserTest, HispanicLastNameRegexConverage) {}

// Tests that address name is not misclassified as name or honorific prefix.
TEST_P(NameFieldParserTest, NotAddressName) {}

// Tests that contact name is classified as full name.
TEST_P(NameFieldParserTest, ContactNameFull) {}

}  // namespace

}  // namespace autofill