#include "components/autofill/core/browser/form_parsing/phone_field_parser.h"
#include <stddef.h>
#include <memory>
#include <vector>
#include "base/containers/contains.h"
#include "base/memory/ptr_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/autofill_field.h"
#include "components/autofill/core/browser/form_parsing/autofill_scanner.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/form_field_data.h"
#include "testing/gtest/include/gtest/gtest.h"
ASCIIToUTF16;
namespace autofill {
namespace {
const FormControlType kFieldTypes[] = …;
}
class PhoneFieldParserTest
: public testing::TestWithParam<PatternProviderFeatureState> { … };
void PhoneFieldParserTest::CheckField(const FieldGlobalId id,
FieldType expected_type) const { … }
autofill::FieldGlobalId PhoneFieldParserTest::AppendField(
const TestFieldData& field_data) { … }
void PhoneFieldParserTest::RunParsingTest(
const std::vector<TestFieldData>& fields,
bool expect_success) { … }
FieldRendererId PhoneFieldParserTest::MakeFieldRendererId() { … }
void PhoneFieldParserTest::Clear() { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(PhoneFieldParserTest, Empty) { … }
TEST_P(PhoneFieldParserTest, NonParse) { … }
TEST_P(PhoneFieldParserTest, ParseOneLinePhoneWithDefaultToCityAndNumber) { … }
TEST_P(PhoneFieldParserTest, ParseTwoLinePhone) { … }
TEST_P(PhoneFieldParserTest, ThreePartPhoneNumber) { … }
TEST_P(PhoneFieldParserTest, ThreePartPhoneNumberPrefixSuffix) { … }
TEST_P(PhoneFieldParserTest, CountryAndCityAndPhoneNumber) { … }
TEST_P(PhoneFieldParserTest, GrammarMetrics) { … }
TEST_P(PhoneFieldParserTest, CountryCodeIsSelectElement) { … }
TEST_P(PhoneFieldParserTest, CountryCodeWithOptions) { … }
TEST_P(PhoneFieldParserTest, IsPhoneCountryCodeField) { … }
TEST_P(PhoneFieldParserTest, IsMonthField) { … }
TEST_P(PhoneFieldParserTest, IsDayField) { … }
TEST_P(PhoneFieldParserTest, IsYearField) { … }
TEST_P(PhoneFieldParserTest, IsTimeZoneField) { … }
}