chromium/components/autofill/core/browser/webdata/payments/autofill_wallet_usage_data_sync_bridge_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/webdata/payments/autofill_wallet_usage_data_sync_bridge.h"

#include <stddef.h>

#include <memory>
#include <utility>

#include "base/files/scoped_temp_dir.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/task_environment.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/test_autofill_clock.h"
#include "components/autofill/core/browser/webdata/autofill_sync_metadata_table.h"
#include "components/autofill/core/browser/webdata/autofill_webdata_backend.h"
#include "components/autofill/core/browser/webdata/mock_autofill_webdata_backend.h"
#include "components/autofill/core/browser/webdata/payments/payments_autofill_table.h"
#include "components/autofill/core/browser/webdata/payments/payments_sync_bridge_util.h"
#include "components/autofill/core/common/autofill_constants.h"
#include "components/sync/base/data_type.h"
#include "components/sync/model/sync_data.h"
#include "components/sync/protocol/autofill_specifics.pb.h"
#include "components/sync/protocol/entity_data.h"
#include "components/sync/protocol/sync.pb.h"
#include "components/sync/test/mock_data_type_local_change_processor.h"
#include "components/webdata/common/web_database.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace autofill {

namespace {

ScopedTempDir;
AutofillWalletUsageSpecifics;
EntityData;
MockDataTypeLocalChangeProcessor;
NiceMock;
Return;

const std::string kExpectedClientTagAndStorageKey =;

std::vector<VirtualCardUsageData> ExtractVirtualCardUsageDataFromDataBatch(
    std::unique_ptr<syncer::DataBatch> batch) {}

}  // namespace

class AutofillWalletUsageDataSyncBridgeTest : public testing::Test {};

TEST_F(AutofillWalletUsageDataSyncBridgeTest, VerifyGetClientTag) {}

TEST_F(AutofillWalletUsageDataSyncBridgeTest, VerifyGetStorageKey) {}

// Tests that `GetDataForCommit()` returns all local usage data of matching
// usage data id.
TEST_F(AutofillWalletUsageDataSyncBridgeTest, GetDataForCommit) {}

// Tests that `GetAllDataForDebugging()` returns all local usage data.
TEST_F(AutofillWalletUsageDataSyncBridgeTest, GetAllDataForDebugging) {}

// Tests that when sync changes are applied, `ApplyIncrementalSyncChanges()`
// merges remotes changes into the local store.
TEST_F(AutofillWalletUsageDataSyncBridgeTest, ApplyIncrementalSyncChanges) {}

// Tests that when sync is stopped and the data type is disabled, client should
// remove all client data.
TEST_F(AutofillWalletUsageDataSyncBridgeTest, ApplyDisableSyncChanges) {}

// Test to ensure whether the data being valid is logged correctly.
TEST_F(AutofillWalletUsageDataSyncBridgeTest, ApplySyncData_LogDataValidity) {}

}  // namespace autofill