#include "components/autofill/core/browser/webdata/addresses/contact_info_sync_bridge.h"
#include <memory>
#include <string_view>
#include "base/files/scoped_temp_dir.h"
#include "base/run_loop.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/data_model/autofill_profile_test_api.h"
#include "components/autofill/core/browser/test_autofill_clock.h"
#include "components/autofill/core/browser/webdata/addresses/address_autofill_table.h"
#include "components/autofill/core/browser/webdata/addresses/contact_info_sync_util.h"
#include "components/autofill/core/browser/webdata/autofill_sync_metadata_table.h"
#include "components/autofill/core/browser/webdata/mock_autofill_webdata_backend.h"
#include "components/sync/base/features.h"
#include "components/sync/model/data_batch.h"
#include "components/sync/test/mock_data_type_local_change_processor.h"
#include "components/webdata/common/web_database.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace autofill {
namespace {
_;
ElementsAre;
UnorderedElementsAre;
constexpr char kGUID1[] = …;
constexpr char kGUID2[] = …;
constexpr char kInvalidGUID[] = …;
MATCHER_P(ContactInfoSpecificsEqualsProfile, expected_profile, "") { … }
std::vector<AutofillProfile> ExtractAutofillProfilesFromDataBatch(
std::unique_ptr<syncer::DataBatch> batch) { … }
AutofillProfile TestProfile(std::string_view guid) { … }
}
class ContactInfoSyncBridgeTest : public testing::Test { … };
TEST_F(ContactInfoSyncBridgeTest, InitializationFailure) { … }
TEST_F(ContactInfoSyncBridgeTest, IsEntityDataValid) { … }
TEST_F(ContactInfoSyncBridgeTest, GetStorageKey) { … }
TEST_F(ContactInfoSyncBridgeTest, MergeFullSyncData) { … }
TEST_F(ContactInfoSyncBridgeTest, ApplyIncrementalSyncChanges) { … }
TEST_F(ContactInfoSyncBridgeTest,
ApplyIncrementalSyncChanges_ModificationDate) { … }
TEST_F(ContactInfoSyncBridgeTest, GetDataForCommit) { … }
TEST_F(ContactInfoSyncBridgeTest, GetAllDataForDebugging) { … }
TEST_F(ContactInfoSyncBridgeTest, AutofillProfileChange_Add) { … }
TEST_F(ContactInfoSyncBridgeTest, AutofillProfileChange_Update) { … }
TEST_F(ContactInfoSyncBridgeTest, AutofillProfileChange_Remove) { … }
TEST_F(ContactInfoSyncBridgeTest, ApplyDisableSyncChanges) { … }
TEST_F(ContactInfoSyncBridgeTest,
TrimAllSupportedFieldsFromRemoteSpecificsPreservesOnlySupportedFields) { … }
TEST_F(ContactInfoSyncBridgeTest,
TrimRemoteSpecificsReturnsEmptyProtoWhenAllFieldsAreSupported) { … }
}