Chromium Code Reviews| Index: components/autofill/core/browser/autofill_manager_unittest.cc |
| diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc |
| index 80ad032012a44a6f8006e52eeebb9c26b249cad7..1df4e23873e76d8e1156835144ec30fbe608b919 100644 |
| --- a/components/autofill/core/browser/autofill_manager_unittest.cc |
| +++ b/components/autofill/core/browser/autofill_manager_unittest.cc |
| @@ -1070,13 +1070,9 @@ class AutofillManagerTest : public testing::Test { |
| security_state::kHttpFormWarningFeature); |
| } |
| - void EnableUkmLogging() { |
| - scoped_feature_list_.InitAndEnableFeature(kAutofillUkmLogging); |
| - } |
| - |
| void EnableAutofillUpstreamRequestCvcIfMissingExperimentAndUkmLogging() { |
|
csashi
2017/05/15 23:46:33
Update function name?
sebsg
2017/05/16 01:06:25
Done.
|
| scoped_feature_list_.InitWithFeatures( |
| - {kAutofillUpstreamRequestCvcIfMissing, kAutofillUkmLogging}, {}); |
| + {kAutofillUpstreamRequestCvcIfMissing}, {}); |
| } |
| void DisableAutofillUpstreamUseAutofillProfileComparatorForName() { |
| @@ -3679,6 +3675,7 @@ TEST_F(AutofillManagerTest, FormSubmittedServerTypes) { |
| // Set up our form data. |
| FormData form; |
| test::CreateTestAddressFormData(&form); |
| + FormsSeen(std::vector<FormData>(1, form)); |
| // Simulate having seen this form on page load. |
| // |form_structure| will be owned by |autofill_manager_|. |
| @@ -3718,6 +3715,7 @@ TEST_F(AutofillManagerTest, FormSubmittedPossibleTypesTwoSubmissions) { |
| FormData form; |
| std::vector<ServerFieldTypeSet> expected_types; |
| test::CreateTestAddressFormData(&form, &expected_types); |
| + FormsSeen(std::vector<FormData>(1, form)); |
| // Fill the form. |
| const char guid[] = "00000000-0000-0000-0000-000000000001"; |
| @@ -4638,7 +4636,6 @@ TEST_F(AutofillManagerTest, FillInUpdatedExpirationDate) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard) { |
| - EnableUkmLogging(); |
| personal_data_.ClearCreditCards(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -4770,7 +4767,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_FeatureNotEnabled) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_CvcUnavailable) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -4822,7 +4818,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_CvcUnavailable) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_CvcInvalidLength) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -4871,7 +4866,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_CvcInvalidLength) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_MultipleCvcFields) { |
| - EnableUkmLogging(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| // Remove the profiles that were created in the TestPersonalDataManager |
| @@ -4932,7 +4926,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_MultipleCvcFields) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_NoCvcFieldOnForm) { |
| - EnableUkmLogging(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| // Remove the profiles that were created in the TestPersonalDataManager |
| @@ -4995,7 +4988,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_NoCvcFieldOnForm) { |
| #endif |
| TEST_F(AutofillManagerTest, |
| MAYBE_UploadCreditCard_NoCvcFieldOnForm_InvalidCvcInNonCvcField) { |
| - EnableUkmLogging(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| // Remove the profiles that were created in the TestPersonalDataManager |
| @@ -5061,7 +5053,6 @@ TEST_F(AutofillManagerTest, |
| #endif |
| TEST_F(AutofillManagerTest, |
| MAYBE_UploadCreditCard_NoCvcFieldOnForm_CvcInNonCvcField) { |
| - EnableUkmLogging(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| // Remove the profiles that were created in the TestPersonalDataManager |
| @@ -5129,7 +5120,6 @@ TEST_F(AutofillManagerTest, |
| #endif |
| TEST_F(AutofillManagerTest, |
| MAYBE_UploadCreditCard_NoCvcFieldOnForm_CvcInAddressField) { |
| - EnableUkmLogging(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| // Remove the profiles that were created in the TestPersonalDataManager |
| @@ -5256,7 +5246,6 @@ TEST_F(AutofillManagerTest, |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_NoCvcFieldOnFormExperimentOff) { |
| - EnableUkmLogging(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| // Remove the profiles that were created in the TestPersonalDataManager |
| @@ -5321,7 +5310,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_NoCvcFieldOnFormExperimentOff) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_NoProfileAvailable) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5369,7 +5357,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_NoRecentlyUsedProfile) { |
| TestAutofillClock test_clock; |
| test_clock.SetNow(kArbitraryTime); |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5417,7 +5404,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_NoRecentlyUsedProfile) { |
| TEST_F(AutofillManagerTest, |
| UploadCreditCard_CvcUnavailableAndNoProfileAvailable) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5468,7 +5454,6 @@ TEST_F(AutofillManagerTest, |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_NoNameAvailable) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5517,7 +5502,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_NoNameAvailable) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_ZipCodesConflict) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5567,7 +5551,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_ZipCodesConflict) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_ZipCodesHavePrefixMatch) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5614,7 +5597,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_ZipCodesHavePrefixMatch) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_NoZipCodeAvailable) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5660,7 +5642,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_NoZipCodeAvailable) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_CCFormHasMiddleInitial) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5751,7 +5732,6 @@ TEST_F(AutofillManagerTest, |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_NoMiddleInitialInCCForm) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5836,7 +5816,6 @@ TEST_F(AutofillManagerTest, |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_CCFormHasMiddleName) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5912,7 +5891,6 @@ TEST_F(AutofillManagerTest, |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_CCFormRemovesMiddleName) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -5950,7 +5928,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_CCFormRemovesMiddleName) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_NamesHaveToMatch) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -6154,7 +6131,6 @@ TEST_F(AutofillManagerTest, UploadCreditCard_LogPreviousUseDate) { |
| } |
| TEST_F(AutofillManagerTest, UploadCreditCard_UploadDetailsFails) { |
| - EnableUkmLogging(); |
| personal_data_.ClearAutofillProfiles(); |
| autofill_manager_->set_credit_card_upload_enabled(true); |
| @@ -6820,6 +6796,7 @@ TEST_F(AutofillManagerTest, SignInFormSubmission_Upload) { |
| test::CreateTestFormField("Password", "pw", "secret", "password", &field); |
| form.fields.push_back(field); |
| + FormsSeen(std::vector<FormData>(1, form)); |
| types.clear(); |
| types.insert(PASSWORD); |
| expected_types.push_back(types); |