chromium/components/autofill/core/browser/webdata/addresses/address_autofill_table_unittest.cc

// Copyright 2023 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/webdata/addresses/address_autofill_table.h"

#include <memory>
#include <string>
#include <string_view>
#include <utility>

#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "base/time/time.h"
#include "base/uuid.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/country_type.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/profile_token_quality.h"
#include "components/autofill/core/browser/profile_token_quality_test_api.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/webdata/common/web_database.h"
#include "sql/statement.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/origin.h"

Time;
ElementsAre;
UnorderedElementsAre;

namespace autofill {

class AddressAutofillTableTest : public testing::Test {};

// Tests for the AutofillProfil CRUD interface are tested with both profile
// record types.
class AddressAutofillTableProfileTest
    : public AddressAutofillTableTest,
      public testing::WithParamInterface<AutofillProfile::RecordType> {};

INSTANTIATE_TEST_SUITE_P();

// Tests reading/writing name, email, company, address and phone number
// information.
TEST_P(AddressAutofillTableProfileTest, AutofillProfile) {}

// Tests that `GetAutofillProfiles(record_type, profiles)` clears `profiles` and
// only returns profiles from the correct `record_type`.
// Not part of the `AddressAutofillTableProfileTest` fixture, as it doesn't
// benefit from parameterization on the `record_type()`.
TEST_F(AddressAutofillTableTest, GetAutofillProfiles) {}

// Tests that `RemoveAllAutofillProfiles()` clears all profiles of the given
// record type.
TEST_P(AddressAutofillTableProfileTest, RemoveAllAutofillProfiles) {}

// Tests that `ProfileTokenQuality` observations are read and written.
TEST_P(AddressAutofillTableProfileTest, ProfileTokenQuality) {}

// Tests that last use dates are persisted, if present.
TEST_P(AddressAutofillTableProfileTest, UseDates) {}

TEST_P(AddressAutofillTableProfileTest, UpdateAutofillProfile) {}

TEST_F(AddressAutofillTableTest, RemoveAutofillDataModifiedBetween) {}

}  // namespace autofill