chromium/components/autofill/core/browser/form_data_importer_utils_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/browser/form_data_importer_utils.h"
#include "components/autofill/core/browser/country_type.h"

#include <string_view>
#include <vector>

#include "base/strings/string_util.h"
#include "base/time/time.h"
#include "components/autofill/core/browser/form_structure.h"
#include "components/autofill/core/browser/test_autofill_clock.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace autofill {

namespace {

// As TimestampedSameOriginQueue cannot be initialized with primitive types,
// this wrapper is used for testing.
struct IntWrapper {};
bool operator==(IntWrapper x, int y) {}

}  // anonymous namespace

// TimestampedSameOriginQueue's queue-like functionality works as expected.
TEST(FormDataImporterUtilsTest, TimestampedSameOriginQueue) {}

TEST(FormDataImporterUtilsTest, TimestampedSameOriginQueue_MaxSize) {}

// RemoveOutdatedItems clears the queue if the origin doesn't match.
TEST(FormDataImporterUtilsTest, TimestampedSameOriginQueue_DifferentOrigins) {}

// RemoveOutdatedItems clears items past their TTL.
TEST(FormDataImporterUtilsTest, TimestampedSameOriginQueue_TTL) {}

// Each test describes a sequence of submitted forms, where 'a' and 'c' indicate
// an address and a credit card form, respectively.
// Using an upper case A or C, forms that are supposed to be part of the
// association are marked.
constexpr std::string_view kFormAssociatorTestCases[]{};

class FormAssociatorTest : public testing::TestWithParam<std::string_view> {};

INSTANTIATE_TEST_SUITE_P();

// Tests that all `kFormAssociationTestCases` yield the correct associations.
TEST_P(FormAssociatorTest, FormAssociator) {}

}  // namespace autofill