#include "components/autofill/core/browser/merchant_promo_code_manager.h"
#include <memory>
#include "base/functional/callback_helpers.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/mock_callback.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/autofill_type.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/form_structure.h"
#include "components/autofill/core/browser/form_structure_test_api.h"
#include "components/autofill/core/browser/metrics/payments/offers_metrics.h"
#include "components/autofill/core/browser/payments_data_manager_test_api.h"
#include "components/autofill/core/browser/test_autofill_client.h"
#include "components/autofill/core/browser/test_personal_data_manager.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_test_utils.h"
#include "components/autofill/core/common/form_data.h"
#include "components/strings/grit/components_strings.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/l10n/l10n_util.h"
namespace autofill {
namespace {
MockSuggestionsReturnedCallback;
CreateTestFormField;
_;
Field;
Truly;
UnorderedElementsAre;
}
class MerchantPromoCodeManagerTest : public testing::Test { … };
TEST_F(MerchantPromoCodeManagerTest, ShowsPromoCodeSuggestions) { … }
TEST_F(MerchantPromoCodeManagerTest,
DoesNotShowPromoCodeOffersIfFieldIsNotAPromoCodeField) { … }
TEST_F(MerchantPromoCodeManagerTest,
DoesNotShowPromoCodeOffersForOffTheRecord) { … }
TEST_F(MerchantPromoCodeManagerTest,
DoesNotShowPromoCodeOffersIfPersonalDataManagerDoesNotExist) { … }
TEST_F(MerchantPromoCodeManagerTest, NoPromoCodeOffers) { … }
TEST_F(MerchantPromoCodeManagerTest, AutofillWalletImportDisabled) { … }
TEST_F(MerchantPromoCodeManagerTest, AutofillCreditCardDisabled) { … }
TEST_F(MerchantPromoCodeManagerTest, PrefixMatched) { … }
TEST_F(MerchantPromoCodeManagerTest,
OnSingleFieldSuggestion_GPayPromoCodeOfferSuggestion) { … }
TEST_F(MerchantPromoCodeManagerTest,
OnSingleFieldSuggestion_GPayPromoCodeOfferFooter) { … }
}