#include "components/autofill/core/browser/payments/payments_requests/unmask_card_request.h"
#include <memory>
#include "base/functional/callback_helpers.h"
#include "base/json/json_reader.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/scoped_feature_list.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/payments/autofill_payments_feature_availability.h"
#include "components/autofill/core/browser/payments/card_unmask_challenge_option.h"
#include "components/autofill/core/common/autofill_payments_features.h"
#include "components/strings/grit/components_strings.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
#include "url/origin.h"
namespace autofill::payments {
class UnmaskCardRequestTest : public testing::Test { … };
TEST_F(UnmaskCardRequestTest, GetRequestContent) { … }
TEST_F(UnmaskCardRequestTest, DoesNotIncludeMerchantDomainWhenFlagDisabled) { … }
TEST_F(UnmaskCardRequestTest, DoesNotIncludeMerchantDomainWhenMissingField) { … }
TEST_F(UnmaskCardRequestTest, FidoChallengeReturned_ParseResponse) { … }
TEST_F(UnmaskCardRequestTest, ContextTokenReturned) { … }
TEST_F(UnmaskCardRequestTest, ContextTokenAndPanNotReturned) { … }
TEST_F(UnmaskCardRequestTest, DoesNotHaveTimeoutWithoutFlag) { … }
TEST_F(UnmaskCardRequestTest, HasTimeoutWhenFlagSet) { … }
class VirtualCardUnmaskCardRequestTest
: public UnmaskCardRequestTest,
public testing::WithParamInterface<
std::tuple<autofill::CardUnmaskChallengeOptionType, bool>> { … };
TEST_P(VirtualCardUnmaskCardRequestTest, GetRequestContent) { … }
TEST_P(VirtualCardUnmaskCardRequestTest,
IncludesOneMerchantDomainWhenFlagDisabled) { … }
TEST_P(VirtualCardUnmaskCardRequestTest,
ChallengeOptionsReturned_ParseResponse) { … }
TEST_P(VirtualCardUnmaskCardRequestTest, IsRetryableFailure) { … }
INSTANTIATE_TEST_SUITE_P(…);
}