#include "components/autofill/core/browser/payments/iban_manager.h"
#include <string_view>
#include "base/functional/callback_helpers.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/mock_callback.h"
#include "base/test/task_environment.h"
#include "base/uuid.h"
#include "components/autofill/core/browser/autofill_field.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_test_api.h"
#include "components/autofill/core/browser/mock_autofill_optimization_guide.h"
#include "components/autofill/core/browser/payments_data_manager.h"
#include "components/autofill/core/browser/test_autofill_client.h"
#include "components/autofill/core/browser/test_personal_data_manager.h"
#include "components/grit/components_scaled_resources.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"
#include "ui/base/resource/mock_resource_bundle_delegate.h"
#include "ui/gfx/image/image_unittest_util.h"
_;
Field;
IsEmpty;
Truly;
UnorderedElementsAre;
namespace autofill {
constexpr char kNickname_0[] = …;
constexpr char kNickname_1[] = …;
constexpr char16_t kIbanValue[] = …;
namespace {
MockSuggestionsReturnedCallback;
}
class IbanManagerTest : public testing::Test { … };
MATCHER_P(MatchesTextAndSuggestionType, suggestion, "") { … }
TEST_F(IbanManagerTest, ShowsAllIbanSuggestions) { … }
TEST_F(IbanManagerTest, PaymentsAutofillEnabledPrefOff_NoIbanSuggestionsShown) { … }
TEST_F(IbanManagerTest, IbanSuggestions_SeparatorAndFooter) { … }
TEST_F(IbanManagerTest,
OnGetSingleFieldSuggestions_FieldEqualsLocalIban_NothingReturned) { … }
TEST_F(IbanManagerTest,
OnGetSingleFieldSuggestions_LocalIbansMatchingPrefix_Shows) { … }
TEST_F(IbanManagerTest,
OnGetSingleFieldSuggestions_ServerIbansMatchingPrefix_Shows_All) { … }
TEST_F(IbanManagerTest,
OnGetSingleFieldSuggestions_ServerIbansMatchingPrefix_Shows_Some) { … }
TEST_F(
IbanManagerTest,
OnGetSingleFieldSuggestions_ServerIbansLackingPrefix_ShowsIfFewCharsInField) { … }
TEST_F(
IbanManagerTest,
OnGetSingleFieldSuggestions_ServerIbansLackingPrefix_HidesIfManyCharsInField) { … }
TEST_F(IbanManagerTest, DoesNotShowIbansForBlockedWebsite) { … }
TEST_F(IbanManagerTest, ShowsIbanSuggestions_OptimizationGuideNotPresent) { … }
TEST_F(IbanManagerTest, NotIbanFieldFocused_NoSuggestionsShown) { … }
TEST_F(IbanManagerTest, Metrics_Suggestions_Allowed) { … }
TEST_F(IbanManagerTest, Metrics_Suggestions_Blocked) { … }
TEST_F(IbanManagerTest, Metrics_Suggestions_BlocklistNotAccessible) { … }
TEST_F(IbanManagerTest, Metrics_SuggestionsShown) { … }
TEST_F(IbanManagerTest, Metrics_LocalIbanSuggestionSelected) { … }
TEST_F(IbanManagerTest, Metrics_ServerIbanSuggestionSelected) { … }
TEST_F(IbanManagerTest, Metrics_SuggestionSelected_CountryOfSelectedIban) { … }
TEST_F(IbanManagerTest, Metrics_NoSuggestionShown) { … }
}