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

// Copyright 2021 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/parsing_test_utils.h"

#include "base/strings/utf_string_conversions.h"
#include "components/autofill/core/browser/form_parsing/buildflags.h"
#include "components/autofill/core/common/autofill_features.h"

namespace autofill {

namespace {
void UpdateRanks(std::vector<std::unique_ptr<AutofillField>>& fields) {}
}  // namespace

std::vector<PatternProviderFeatureState> PatternProviderFeatureState::All() {}

FormFieldParserTestBase::FormFieldParserTestBase(
    PatternProviderFeatureState pattern_provider_feature_state) {}

FormFieldParserTestBase::~FormFieldParserTestBase() = default;

void FormFieldParserTestBase::AddFormFieldData(FormControlType control_type,
                                               std::string_view name,
                                               std::string_view label,
                                               std::string_view placeholder,
                                               int max_length,
                                               FieldType expected_type) {}

void FormFieldParserTestBase::AddFormFieldData(FormControlType control_type,
                                               std::string_view name,
                                               std::string_view label,
                                               FieldType expected_type) {}

void FormFieldParserTestBase::AddSelectOneFormFieldData(
    std::string_view name,
    std::string_view label,
    const std::vector<SelectOption>& options,
    FieldType expected_type) {}

void FormFieldParserTestBase::AddTextFormFieldData(std::string_view name,
                                                   std::string_view label,
                                                   FieldType expected_type) {}

// Apply parsing and verify the expected types.
// |parsed| indicates if at least one field could be parsed successfully.
// |page_language| the language to be used for parsing, default empty value
// means the language is unknown and patterns of all languages are used.
void FormFieldParserTestBase::ClassifyAndVerify(
    ParseResult parse_result,
    const GeoIpCountryCode& client_country,
    const LanguageCode& page_language) {}

// Runs multiple parsing attempts until the end of the form is reached.
void FormFieldParserTestBase::ClassifyAndVerifyWithMultipleParses(
    const GeoIpCountryCode& client_country,
    const LanguageCode& page_language) {}

void FormFieldParserTestBase::TestClassificationExpectations() {}

FieldRendererId FormFieldParserTestBase::MakeFieldRendererId() {}

void FormFieldParserTestBase::ClearFieldsAndExpectations() {}

}  // namespace autofill