#include "components/autofill/core/browser/browser_autofill_manager.h"
#include <stddef.h>
#include <memory>
#include <optional>
#include <string>
#include <tuple>
#include <utility>
#include <vector>
#include "base/base64.h"
#include "base/command_line.h"
#include "base/containers/span.h"
#include "base/feature_list.h"
#include "base/hash/hash.h"
#include "base/memory/ref_counted.h"
#include "base/metrics/field_trial.h"
#include "base/metrics/metrics_hashes.h"
#include "base/ranges/algorithm.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/gmock_callback_support.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "components/autofill/core/browser/address_data_manager.h"
#include "components/autofill/core/browser/address_data_manager_test_api.h"
#include "components/autofill/core/browser/address_suggestion_generator.h"
#include "components/autofill/core/browser/autofill_compose_delegate.h"
#include "components/autofill/core/browser/autofill_experiments.h"
#include "components/autofill/core/browser/autofill_form_test_utils.h"
#include "components/autofill/core/browser/autofill_plus_address_delegate.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/browser_autofill_manager_test_api.h"
#include "components/autofill/core/browser/crowdsourcing/mock_autofill_crowdsourcing_manager.h"
#include "components/autofill/core/browser/data_model/autofill_profile.h"
#include "components/autofill/core/browser/data_model/autofill_profile_test_api.h"
#include "components/autofill/core/browser/data_model/credit_card.h"
#include "components/autofill/core/browser/data_model/iban.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/filling_product.h"
#include "components/autofill/core/browser/form_data_importer_test_api.h"
#include "components/autofill/core/browser/form_structure_test_api.h"
#include "components/autofill/core/browser/geo/alternative_state_name_map_test_utils.h"
#include "components/autofill/core/browser/metrics/form_events/form_events.h"
#include "components/autofill/core/browser/metrics/log_event.h"
#include "components/autofill/core/browser/mock_autofill_compose_delegate.h"
#include "components/autofill/core/browser/mock_autofill_optimization_guide.h"
#include "components/autofill/core/browser/mock_autofill_plus_address_delegate.h"
#include "components/autofill/core/browser/mock_autofill_prediction_improvements_delegate.h"
#include "components/autofill/core/browser/mock_single_field_form_fill_router.h"
#include "components/autofill/core/browser/payments/credit_card_cvc_authenticator.h"
#include "components/autofill/core/browser/payments/payments_autofill_client.h"
#include "components/autofill/core/browser/payments/test_credit_card_save_manager.h"
#include "components/autofill/core/browser/payments/test_payments_autofill_client.h"
#include "components/autofill/core/browser/payments/test_payments_network_interface.h"
#include "components/autofill/core/browser/payments_data_manager.h"
#include "components/autofill/core/browser/payments_suggestion_generator.h"
#include "components/autofill/core/browser/personal_data_manager.h"
#include "components/autofill/core/browser/profile_token_quality.h"
#include "components/autofill/core/browser/profile_token_quality_test_api.h"
#include "components/autofill/core/browser/strike_databases/payments/test_credit_card_save_strike_database.h"
#include "components/autofill/core/browser/test_autofill_client.h"
#include "components/autofill/core/browser/test_autofill_clock.h"
#include "components/autofill/core/browser/test_autofill_driver.h"
#include "components/autofill/core/browser/test_autofill_external_delegate.h"
#include "components/autofill/core/browser/test_autofill_manager_waiter.h"
#include "components/autofill/core/browser/test_browser_autofill_manager.h"
#include "components/autofill/core/browser/test_form_data_importer.h"
#include "components/autofill/core/browser/test_personal_data_manager.h"
#include "components/autofill/core/browser/test_utils/vote_uploads_test_matchers.h"
#include "components/autofill/core/browser/ui/payments/bubble_show_options.h"
#include "components/autofill/core/browser/ui/suggestion.h"
#include "components/autofill/core/browser/ui/suggestion_test_helpers.h"
#include "components/autofill/core/browser/ui/suggestion_type.h"
#include "components/autofill/core/browser/validation.h"
#include "components/autofill/core/common/autocomplete_parsing_util.h"
#include "components/autofill/core/common/autofill_clock.h"
#include "components/autofill/core/common/autofill_features.h"
#include "components/autofill/core/common/autofill_payments_features.h"
#include "components/autofill/core/common/autofill_prefs.h"
#include "components/autofill/core/common/autofill_switches.h"
#include "components/autofill/core/common/autofill_test_utils.h"
#include "components/autofill/core/common/autofill_util.h"
#include "components/autofill/core/common/credit_card_network_identifiers.h"
#include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/form_data_test_api.h"
#include "components/autofill/core/common/form_field_data.h"
#include "components/autofill/core/common/mojom/autofill_types.mojom-shared.h"
#include "components/autofill/core/common/signatures.h"
#include "components/feature_engagement/public/feature_constants.h"
#include "components/prefs/pref_service.h"
#include "components/security_interstitials/core/pref_names.h"
#include "components/security_state/core/security_state.h"
#include "components/strings/grit/components_strings.h"
#include "components/sync/test/test_sync_service.h"
#include "components/translate/core/common/language_detection_details.h"
#include "components/variations/variations_associated_data.h"
#include "components/version_info/channel.h"
#include "net/base/url_util.h"
#include "services/metrics/public/cpp/ukm_builders.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/l10n/l10n_util.h"
#include "ui/gfx/geometry/rect.h"
#include "url/gurl.h"
#include "url/url_canon.h"
namespace autofill {
namespace …
class BrowserAutofillManagerTest : public testing::Test { … };
class SuggestionMatchingTest : public BrowserAutofillManagerTest,
public testing::WithParamInterface<bool> { … };
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
void SuggestionMatchingTest::InitializeFeatures() {}
#else
void SuggestionMatchingTest::InitializeFeatures() { … }
#endif
class CreditCardSuggestionTest : public BrowserAutofillManagerTest { … };
TEST_F(BrowserAutofillManagerTest, OnFormsSeen_DifferentFormStructures) { … }
TEST_F(BrowserAutofillManagerTest, OnFormsSeen_SendTypePredictionsToRenderer) { … }
TEST_F(BrowserAutofillManagerTest,
GetProfileSuggestions_UnrecognizedAttribute) { … }
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_IOS)
TEST_F(BrowserAutofillManagerTest,
GetProfileSuggestions_BlockSuggestionsAfterStrikeLimit) { … }
#endif
#if BUILDFLAG(IS_ANDROID) || BUILDFLAG(IS_IOS)
TEST_F(BrowserAutofillManagerTest,
GetProfileSuggestions_UnrecognizedAttribute_Predictions_Mobile) {
FormData form = CreateTestAddressFormData();
test_api(form).field(0).set_parsed_autocomplete(
AutocompleteParsingResult{.field_type = HtmlFieldType::kUnrecognized});
FormsSeen({form});
for (const FormFieldData& field : form.fields()) {
GetAutofillSuggestions(form, field);
external_delegate()->CheckSuggestionCount(field.global_id(), 4);
}
}
#else
TEST_F(BrowserAutofillManagerTest,
AutofillManualFallback_UnclassifiedField_SuggestionsShown) { … }
TEST_F(BrowserAutofillManagerTest,
AutofillManualFallback_AutocompleteUnrecognized_SuggestionsShown) { … }
TEST_F(BrowserAutofillManagerTest,
AutofillManualFallback_ClassifiedField_AddressForm_ShowSuggestions) { … }
TEST_F(BrowserAutofillManagerTest,
AutofillManualFallback_ClassifiedField_PaymentsForm_ShowSuggestions) { … }
TEST_F(BrowserAutofillManagerTest,
AutofillManualFallback_IphIsDisplayedCorrectly) { … }
TEST_F(BrowserAutofillManagerTest, AutofillManualFallback_NotifyFeatureUsed) { … }
#endif
TEST_F(BrowserAutofillManagerTest,
GetProfileSuggestions_MinFieldsEnforced_NoAutocomplete) { … }
TEST_F(BrowserAutofillManagerTest,
GetProfileSuggestions_MinFieldsEnforced_WithOneAutocomplete) { … }
TEST_F(BrowserAutofillManagerTest,
GetProfileSuggestions_SmallFormWithTwoAutocomplete) { … }
TEST_F(BrowserAutofillManagerTest, GetVirtualCreditCardsForStandaloneCvcField) { … }
TEST_P(SuggestionMatchingTest, GetProfileSuggestions_EmptyValue) { … }
TEST_P(SuggestionMatchingTest, GetProfileSuggestions_MatchCharacter) { … }
TEST_P(SuggestionMatchingTest,
GetProfileSuggestions_AlreadyAutofilledMergeValues) { … }
TEST_P(SuggestionMatchingTest,
GetProfileSuggestions_AlreadyAutofilledNoLabels) { … }
TEST_F(BrowserAutofillManagerTest, GetProfileSuggestions_UnknownFields) { … }
TEST_F(BrowserAutofillManagerTest,
GetProfileSuggestions_DialogClosedByUser_NoData) { … }
TEST_F(BrowserAutofillManagerTest,
GetProfileSuggestions_ManualFallback_NoData) { … }
struct ManualFallbackTestParams { … };
class ManualFallbackTest
: public BrowserAutofillManagerTest,
public ::testing::WithParamInterface<ManualFallbackTestParams> { … };
TEST_P(ManualFallbackTest, ReturnsExpectedSuggestionTypes) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(SuggestionMatchingTest, GetProfileSuggestions_WithDuplicates) { … }
TEST_F(BrowserAutofillManagerTest,
GetProfileSuggestions_AutofillDisabledByUser) { … }
TEST_F(BrowserAutofillManagerTest, TestParseFormUntilInteractionMetric) { … }
TEST_F(BrowserAutofillManagerTest,
OnSuggestionsReturned_CallsExternalDelegate) { … }
class BrowserAutofillManagerTestForMetadataCardSuggestions
: public BrowserAutofillManagerTest,
public testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_EmptyValue) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_Whitespace) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_StopCharsOnly) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_InvisibleUnicodeOnly) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_StopCharsWithInput) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_MatchCharacter) { … }
TEST_F(CreditCardSuggestionTest, GetCreditCardSuggestions_CCNumber) { … }
TEST_F(CreditCardSuggestionTest, GetCreditCardSuggestions_NonCCNumber) { … }
TEST_F(BrowserAutofillManagerTest,
GetCreditCardSuggestions_SecureContext_FormActionNotHTTPS) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_SecureContext_EmptyFormAction) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_SecureContext_JavascriptFormAction) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_RepeatedObfuscatedNumber) { … }
TEST_F(BrowserAutofillManagerTest,
GetCreditCardSuggestions_MaskedCardWithMoreThan6Digits) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_ExpiredCards) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_SuppressDisusedCreditCardsOnEmptyField) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_NumberMissing) { … }
TEST_P(SuggestionMatchingTest, GetAddressAndCreditCardSuggestions) { … }
TEST_F(BrowserAutofillManagerTest, GetAddressAndCreditCardSuggestionsNonHttps) { … }
TEST_F(BrowserAutofillManagerTest,
ShouldShowAddressSuggestionsIfCreditCardAutofillDisabled) { … }
TEST_F(BrowserAutofillManagerTest,
ShouldShowCreditCardSuggestionsIfAddressAutofillDisabled) { … }
TEST_F(BrowserAutofillManagerTest,
ShouldNotShowCreditCardsSuggestionsIfCreditCardAutofillDisabled) { … }
TEST_F(BrowserAutofillManagerTest,
ShowCreditCardSuggestions_ForExpirationTypeField_IfEmptyCCNumber) { … }
TEST_F(
BrowserAutofillManagerTest,
ShowCreditCardSuggestions_ForExpirationTypeField_IfNonEmptyAutofilledCCNumber) { … }
TEST_F(
BrowserAutofillManagerTest,
DoNotShowCreditCardSuggestions_ForExpirationTypeField_IfNonEmptyNonAutofilledCCNumber) { … }
TEST_F(BrowserAutofillManagerTest,
ShouldNotShowAddressSuggestionsIfAddressAutofillDisabled) { … }
TEST_F(BrowserAutofillManagerTest,
ShouldShowAddressSuggestionsIfAblationIsInDryRunMode) { … }
struct LogAblationTestParams { … };
enum class LogAblationFormType { … };
class BrowserAutofillManagerLogAblationTest
: public BrowserAutofillManagerTest,
public testing::WithParamInterface<
std::tuple<LogAblationTestParams, LogAblationFormType>> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(BrowserAutofillManagerLogAblationTest, TestLogging) { … }
TEST_F(BrowserAutofillManagerTest, DetermineStateFieldTypeForUpload) { … }
TEST_F(BrowserAutofillManagerTest,
OnFormsSeen_AutofillDisabledPasswordManagerEnabled) { … }
TEST_P(SuggestionMatchingTest, GetFieldSuggestionsWhenFormIsAutofilled) { … }
#if !BUILDFLAG(IS_ANDROID)
TEST_P(SuggestionMatchingTest, GetFieldSuggestionsWithDuplicateValues) { … }
#endif
TEST_F(BrowserAutofillManagerTest,
GetProfileSuggestions_ForEmailFieldWithUserNameAutocomplete) { … }
TEST_F(BrowserAutofillManagerTest, GetProfileSuggestions_FieldSwapping) { … }
TEST_F(BrowserAutofillManagerTest, AutocompleteUnrecognizedFields_KeyMetrics) { … }
TEST_F(BrowserAutofillManagerTest,
OnCreditCardFetchedSuccessfully_LocalCreditCard) { … }
TEST_F(BrowserAutofillManagerTest,
OnCreditCardFetchedSuccessfully_ServerCreditCard) { … }
TEST_F(BrowserAutofillManagerTest,
OnCreditCardFetchedSuccessfully_VirtualCreditCard) { … }
TEST_F(BrowserAutofillManagerTest, FormSubmitted_FormDataImporter) { … }
TEST_F(BrowserAutofillManagerTest,
UserPerceptionOfAddressAutofillSurvey_MinFormSizeReached_TriggerSurvey) { … }
TEST_F(
BrowserAutofillManagerTest,
UserPerceptionOfAutofillSurvey_MinFormSizeNotReached_DoNotTriggerSurvey) { … }
TEST_F(BrowserAutofillManagerTest,
UserPerceptionOfCreditCardAutofillSurvey_TriggerSurvey) { … }
class BrowserAutofillManagerWithLogEventsTest
: public BrowserAutofillManagerTest { … };
TEST_F(BrowserAutofillManagerWithLogEventsTest, LogEventsAtFormSubmitted) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest,
LogEventsFillPartlyManuallyFilledForm) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest,
FillingMethod_TargetedAllFields_FullForm) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest,
FillingMethod_TargetedGranularFillingGroup_GroupFilling) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest,
FillingMethod_TargetedSingleField_FieldByFieldFilling) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest, LogEventsAtRefillForm) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest, LogEventsAtUserTypingInField) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest,
LogEventsAutofillSuggestionsOrTouchToFill) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest,
LogEventsOnAutocompleteAttributeField) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest,
LogEventsParseQueryResponseServerPrediction) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest,
LogEventsRationalizationTwoAddresses) { … }
TEST_F(BrowserAutofillManagerWithLogEventsTest, LogIBANField) { … }
TEST_F(BrowserAutofillManagerTest, FormSubmittedAutocompleteEnabled) { … }
TEST_F(BrowserAutofillManagerTest, ValuePatternsMetric) { … }
TEST_F(BrowserAutofillManagerTest,
SingleFieldFormFillSuggestions_SomeWhenAutofillDisabled) { … }
TEST_F(BrowserAutofillManagerTest,
SingleFieldFormFillSuggestions_NoneWhenAutofillPresent) { … }
TEST_F(BrowserAutofillManagerTest,
SingleFieldFormFillSuggestions_SomeWhenAutofillEmpty) { … }
TEST_F(BrowserAutofillManagerTest,
SingleFieldFormFillSuggestions_CreditCardNameFieldShouldAutocomplete) { … }
TEST_F(BrowserAutofillManagerTest,
SingleFieldFormFillSuggestions_CreditCardNumberShouldNotAutocomplete) { … }
TEST_F(
BrowserAutofillManagerTest,
SingleFieldFormFillSuggestions_NoneWhenAutofillEmptyAndSingleFieldFormFillConditionsNotMet) { … }
TEST_F(
BrowserAutofillManagerTest,
SingleFieldFormFillSuggestions_NoneWhenSingleFieldFormFillConditionsNotMet) { … }
TEST_F(BrowserAutofillManagerTest,
DestructorCancelsSingleFieldFormFillQueries) { … }
TEST_F(BrowserAutofillManagerTest, OnLoadedServerPredictionsFromApi) { … }
TEST_F(BrowserAutofillManagerTest, OnLoadedServerPredictions_ResetManager) { … }
TEST_F(BrowserAutofillManagerTest, DetermineHeuristicsWithOverallPrediction) { … }
TEST_F(BrowserAutofillManagerTest, FormSubmittedWithDifferentFields) { … }
TEST_F(BrowserAutofillManagerTest, FormSubmittedWithDefaultValues) { … }
void DoTestFormSubmittedControlWithDefaultValue(
BrowserAutofillManagerTest* test,
FormControlType form_control_type) { … }
TEST_F(BrowserAutofillManagerTest, FormSubmittedSelectWithDefaultValue) { … }
TEST_F(BrowserAutofillManagerTest, FormSubmittedSelectListWithDefaultValue) { … }
void DoTestFormSubmittedNonAddressControlWithDefaultValue(
BrowserAutofillManagerTest* test,
FormControlType form_control_type) { … }
TEST_F(BrowserAutofillManagerTest,
FormSubmittedNonAddressSelectWithDefaultValue) { … }
TEST_F(BrowserAutofillManagerTest,
FormSubmittedNonAddressSelectListWithDefaultValue) { … }
TEST_F(BrowserAutofillManagerTest,
DeterminePossibleFieldTypesForUpload_IsTriggered) { … }
TEST_F(BrowserAutofillManagerTest, RemoveProfile) { … }
TEST_F(BrowserAutofillManagerTest, RemoveLocalCreditCard) { … }
TEST_F(BrowserAutofillManagerTest, RemoveServerCreditCard) { … }
TEST_F(BrowserAutofillManagerTest, TestExternalDelegate) { … }
TEST_F(BrowserAutofillManagerTest, OnTextFieldDidChangeAndUnfocus_Upload) { … }
TEST_F(BrowserAutofillManagerTest, OnTextFieldDidChangeAndNavigation_Upload) { … }
TEST_F(BrowserAutofillManagerTest, OnDidFillAutofillFormDataAndUnfocus_Upload) { … }
TEST_F(BrowserAutofillManagerTest,
GetCreditCardSuggestions_UnrecognizedAttribute) { … }
TEST_P(BrowserAutofillManagerTestForMetadataCardSuggestions,
GetCreditCardSuggestions_ForNumberSplitAcrossFields) { … }
TEST_F(BrowserAutofillManagerTest, DontSaveCvcInAutocompleteHistory) { … }
TEST_F(BrowserAutofillManagerTest, DontOfferToSavePaymentsCard) { … }
TEST_F(BrowserAutofillManagerTest, ProfileDisabledDoesNotSuggest) { … }
TEST_F(BrowserAutofillManagerTest, CreditCardDisabledDoesNotSuggest) { … }
TEST_F(BrowserAutofillManagerTest, ShouldUploadForm) { … }
TEST_F(BrowserAutofillManagerTest,
DisplaySuggestions_AutocompleteOffNotRespected_AddressField) { … }
TEST_F(BrowserAutofillManagerTest,
DisplaySuggestions_AutocompleteOff_CreditCardField) { … }
TEST_F(BrowserAutofillManagerTest,
DisplaySuggestionsForUpdatedServerTypedForm) { … }
TEST_F(BrowserAutofillManagerTest, GetCreditCardSuggestions_VirtualCard) { … }
TEST_F(BrowserAutofillManagerTest,
GetCreditCardSuggestions_VirtualCard_MetadataEnabled) { … }
TEST_F(BrowserAutofillManagerTest,
IbanFormProcessed_AutofillOptimizationGuidePresent) { … }
TEST_F(BrowserAutofillManagerTest,
IbanFormProcessed_AutofillOptimizationGuideNotPresent) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogAutocomplete_NoHappinessMetricsEmitted) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogAutofillAddressShownMetric) { … }
TEST_F(BrowserAutofillManagerTest, DidShowSuggestions_LogByType_AddressOnly) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogByType_AddressOnlyWithoutName) { … }
TEST_F(BrowserAutofillManagerTest, DidShowSuggestions_LogByType_ContactOnly) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogByType_ContactOnlyWithoutName) { … }
TEST_F(BrowserAutofillManagerTest, DidShowSuggestions_LogByType_PhoneOnly) { … }
TEST_F(BrowserAutofillManagerTest, DidShowSuggestions_LogByType_Other) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogByType_AddressPlusEmail) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogByType_AddressPlusEmailWithoutName) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogByType_AddressPlusPhone) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogByType_AddressPlusPhoneWithoutName) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogByType_AddressPlusEmailPlusPhone) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogByType_AddressPlusEmailPlusPhoneWithoutName) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_LogAutofillCreditCardShownMetric) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_CreditCard_PreflightFetchingCall) { … }
TEST_F(BrowserAutofillManagerTest,
DidShowSuggestions_AddessSuggestion_NoPreflightFetchingCall) { … }
TEST_F(BrowserAutofillManagerTest, PageLanguageGetsCorrectlySet) { … }
class BrowserAutofillManagerTestPageLanguageDetection
: public BrowserAutofillManagerTest,
public testing::WithParamInterface<bool> { … };
TEST_P(BrowserAutofillManagerTestPageLanguageDetection, GetsCorrectlyDetected) { … }
INSTANTIATE_TEST_SUITE_P(…);
class BrowserAutofillManagerProfileMetricsTest
: public BrowserAutofillManagerTest,
public testing::WithParamInterface<profile_metrics::BrowserProfileType> { … };
TEST_P(BrowserAutofillManagerProfileMetricsTest,
FormSubmissionPerProfileTypeMetrics) { … }
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(BrowserAutofillManagerTest, AutocompleteMetrics) { … }
TEST_F(BrowserAutofillManagerTest, GetSuggestions_MixedForm) { … }
TEST_F(BrowserAutofillManagerTest, GetSuggestions_MixedFormOptOutPolicy) { … }
TEST_F(BrowserAutofillManagerTest, GetSuggestions_MixedFormUserTyped) { … }
TEST_F(BrowserAutofillManagerTest, GetSuggestions_JavascriptUrlTarget) { … }
TEST_F(BrowserAutofillManagerTest, GetSuggestions_AboutBlankTarget) { … }
TEST_F(BrowserAutofillManagerTest, HideAutofillSuggestionsAndOtherPopups) { … }
TEST_F(BrowserAutofillManagerTest, OnDidEndTextFieldEditing) { … }
TEST_F(BrowserAutofillManagerTest, TouchToFillSuggestionForIban) { … }
TEST_F(BrowserAutofillManagerTest, AutofillSuggestionsOrTouchToFillForCards) { … }
TEST_F(BrowserAutofillManagerTest, ShowNothingIfTouchToFillAlreadyShown) { … }
TEST_F(BrowserAutofillManagerTest, ScanCreditCardBasedOnAutofillPreference) { … }
TEST_F(BrowserAutofillManagerTest, ScanCreditCardBasedOnPlatformSupport) { … }
TEST_F(BrowserAutofillManagerTest, ScanCreditCardBasedOnCreditCardNumberField) { … }
TEST_F(BrowserAutofillManagerTest, ScanCreditCardBasedOnIsFormSecure) { … }
TEST_F(BrowserAutofillManagerTest, NoComposeSuggestionsByDefault) { … }
TEST_F(BrowserAutofillManagerTest, ComposeSuggestionsOnFocusWithoutClick) { … }
TEST_F(BrowserAutofillManagerTest, ComposeSuggestionsAreQueriedForTextareas) { … }
TEST_F(BrowserAutofillManagerTest, FillFormWithPredictionImprovements) { … }
class OnFocusOnFormFieldTest : public BrowserAutofillManagerTest,
public testing::WithParamInterface<bool> { … };
TEST_P(OnFocusOnFormFieldTest, AddressSuggestions) { … }
TEST_P(OnFocusOnFormFieldTest, AddressSuggestions_AutocompleteOffNotRespected) { … }
TEST_P(OnFocusOnFormFieldTest, AddressSuggestions_Ablation) { … }
TEST_P(OnFocusOnFormFieldTest, CreditCardSuggestions_SecureContext) { … }
TEST_P(OnFocusOnFormFieldTest, CreditCardSuggestions_NonSecureContext) { … }
TEST_P(OnFocusOnFormFieldTest, CreditCardSuggestions_Ablation) { … }
TEST_P(OnFocusOnFormFieldTest, FocusReporting) { … }
INSTANTIATE_TEST_SUITE_P(…);
#if BUILDFLAG(IS_IOS) || BUILDFLAG(IS_ANDROID)
INSTANTIATE_TEST_SUITE_P(, SuggestionMatchingTest, testing::Values(false));
#else
INSTANTIATE_TEST_SUITE_P(…);
#endif
struct ShareNicknameTestParam { … };
const ShareNicknameTestParam kShareNicknameTestParam[] = …;
class BrowserAutofillManagerTestForSharingNickname
: public BrowserAutofillManagerTest,
public testing::WithParamInterface<ShareNicknameTestParam> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(BrowserAutofillManagerTestForSharingNickname,
VerifySuggestion_DuplicateCards) { … }
TEST_P(BrowserAutofillManagerTestForSharingNickname,
VerifySuggestion_UnrelatedCards) { … }
class BrowserAutofillManagerClearFieldTest : public BrowserAutofillManagerTest { … };
TEST_F(BrowserAutofillManagerClearFieldTest, OneClearedField) { … }
TEST_F(BrowserAutofillManagerClearFieldTest, TwoClearedFields) { … }
TEST_F(BrowserAutofillManagerClearFieldTest, ModifiedButDidNotClearField) { … }
TEST_F(BrowserAutofillManagerClearFieldTest, NoLoggingAfterDelay) { … }
class BrowserAutofillManagerVotingTest : public BrowserAutofillManagerTest { … };
TEST_F(BrowserAutofillManagerVotingTest, Submission) { … }
TEST_F(BrowserAutofillManagerVotingTest, DynamicFormSubmission) { … }
TEST_F(BrowserAutofillManagerVotingTest, BlurVoteOnNavigation) { … }
TEST_F(BrowserAutofillManagerVotingTest, NoBlurVoteOnSubmission) { … }
TEST_F(BrowserAutofillManagerTest, OnSingleFieldSuggestionSelected) { … }
TEST_F(BrowserAutofillManagerTest, FillAddressForm_UpdateProfile) { … }
TEST_F(BrowserAutofillManagerTest, FillAddressForm_CollectObservations) { … }
class BrowserAutofillManagerPlusAddressTest
: public BrowserAutofillManagerTest { … };
TEST_F(BrowserAutofillManagerPlusAddressTest, NoPlusAddressesWithNameFields) { … }
TEST_F(BrowserAutofillManagerPlusAddressTest,
CreatePlusAddressSuggestionShownWithAddressSuggestions) { … }
TEST_F(BrowserAutofillManagerPlusAddressTest,
CreatePlusAddressSuggestionShown) { … }
TEST_F(BrowserAutofillManagerPlusAddressTest,
NoPlusAddressOnlyIBANsSuggestions) { … }
TEST_F(BrowserAutofillManagerPlusAddressTest,
NoPlusAddressOnlyPromoCodesSuggestions) { … }
TEST_F(BrowserAutofillManagerPlusAddressTest,
CreatePlusAddressSuggestionShownWithSingleFieldFormFillSuggestions) { … }
TEST_F(BrowserAutofillManagerPlusAddressTest,
NoStandaloneManagePlusAddressSuggestion) { … }
TEST_F(BrowserAutofillManagerPlusAddressTest, ManualFallbackPlusAddress) { … }
TEST_F(BrowserAutofillManagerPlusAddressTest,
DontSavePlusAddressInAutocompleteHistory) { … }
}