chromium/components/autofill/core/browser/payments/virtual_card_enrollment_manager_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 <string>

#include "base/functional/callback.h"
#include "base/strings/string_number_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/data_model/credit_card.h"
#include "components/autofill/core/browser/data_model/credit_card_art_image.h"
#include "components/autofill/core/browser/metrics/autofill_metrics.h"
#include "components/autofill/core/browser/metrics/payments/virtual_card_enrollment_metrics.h"
#include "components/autofill/core/browser/payments/payments_autofill_client.h"
#include "components/autofill/core/browser/payments/payments_requests/update_virtual_card_enrollment_request.h"
#include "components/autofill/core/browser/payments/payments_util.h"
#include "components/autofill/core/browser/payments/test_legal_message_line.h"
#include "components/autofill/core/browser/payments/test_payments_network_interface.h"
#include "components/autofill/core/browser/payments/test_virtual_card_enrollment_manager.h"
#include "components/autofill/core/browser/payments/virtual_card_enrollment_flow.h"
#include "components/autofill/core/browser/strike_databases/payments/test_strike_database.h"
#include "components/autofill/core/browser/test_autofill_client.h"
#include "components/autofill/core/browser/test_autofill_driver.h"
#include "components/autofill/core/browser/test_personal_data_manager.h"
#include "components/autofill/core/common/autofill_payments_features.h"
#include "components/sync/test/test_sync_service.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/resource/mock_resource_bundle_delegate.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/image/image_unittest_util.h"

_;
NiceMock;

namespace autofill {

namespace {
const std::string kTestVcnContextToken =;
const std::string kTestRiskData =;
}  // namespace

class VirtualCardEnrollmentManagerTest : public testing::Test {};

TEST_F(VirtualCardEnrollmentManagerTest, InitVirtualCardEnroll) {}

TEST_F(VirtualCardEnrollmentManagerTest,
       InitVirtualCardEnroll_GetDetailsForEnrollmentResponseReceived) {}

TEST_F(VirtualCardEnrollmentManagerTest, OnRiskDataLoadedForVirtualCard) {}

TEST_F(VirtualCardEnrollmentManagerTest, OnDidGetDetailsForEnrollResponse) {}

TEST_F(VirtualCardEnrollmentManagerTest,
       OnDidGetDetailsForEnrollResponse_NoAutofillClient) {}

TEST_F(VirtualCardEnrollmentManagerTest,
       OnDidGetDetailsForEnrollResponse_Reset) {}

TEST_F(VirtualCardEnrollmentManagerTest, Enroll) {}

TEST_F(VirtualCardEnrollmentManagerTest, Unenroll) {}

#if !BUILDFLAG(IS_IOS)
TEST_F(VirtualCardEnrollmentManagerTest, StrikeDatabase_BubbleAccepted) {}

TEST_F(VirtualCardEnrollmentManagerTest, StrikeDatabase_BubbleCanceled) {}

TEST_F(VirtualCardEnrollmentManagerTest, StrikeDatabase_BubbleBlocked) {}

TEST_F(VirtualCardEnrollmentManagerTest,
       StrikeDatabase_EnrollmentAttemptFailed) {}

TEST_F(VirtualCardEnrollmentManagerTest,
       StrikeDatabase_SettingsPageNotBlocked) {}

// Test to ensure that the |last_show| inside a VirtualCardEnrollmentFields is
// set correctly.
TEST_F(VirtualCardEnrollmentManagerTest, VirtualCardEnrollmentFields_LastShow) {}

// Test to ensure that the required delay since the last strike is respected
// before Chrome offers another virtual card enrollment for the card.
TEST_F(VirtualCardEnrollmentManagerTest, RequiredDelaySinceLastStrike) {}

#endif  // !BUILDFLAG(IS_IOS)

TEST_F(VirtualCardEnrollmentManagerTest, Metrics_LatencySinceUpstream) {}

}  // namespace autofill