chromium/components/autofill/core/common/autocomplete_parsing_util_unittest.cc

// Copyright 2022 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/common/autocomplete_parsing_util.h"

#include <optional>
#include <string>

#include "components/autofill/core/common/form_field_data.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace autofill {

// Tests that parsing a field with autocomplete=`autocomplete` and
// maxlength=`max_length` results in `expected_result`.
struct AutocompleteAttributeTestcase {};

class AutocompleteAttributeProcessingUtilTest
    : public testing::TestWithParam<AutocompleteAttributeTestcase> {};

// In general, `ParseAutocompleteAttribute()` returns std::nullopt if one of
// the tokens cannot be parsed. The exception is the field type, which defaults
// to HtmlFieldType::kUnrecognized.
const AutocompleteAttributeTestcase kAutocompleteTestcases[]{};

INSTANTIATE_TEST_SUITE_P();

TEST_P(AutocompleteAttributeProcessingUtilTest, ParseAutocompleteAttribute) {}

TEST_F(AutocompleteAttributeProcessingUtilTest,
       IsAutocompleteTypeWrongButWellIntended_FalseOnIgnoredValues) {}

TEST_F(
    AutocompleteAttributeProcessingUtilTest,
    IsAutocompleteTypeWrongButWellIntended_FalseOnSubstringMatchWithKnownValue) {}

TEST_F(AutocompleteAttributeProcessingUtilTest,
       IsAutocompleteTypeWrongButWellIntended_TrueOnPossibleTypo) {}

TEST_F(AutocompleteAttributeProcessingUtilTest,
       IsAutocompleteTypeWrongButWellIntended_FalseOnDisableKeywordFound) {}

}  // namespace autofill