Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Unified Diff: components/autofill/core/browser/autofill_manager_unittest.cc

Issue 2146523004: Make full-form autofill the only implementation on iOS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 5ebd6204cb7769aaa0270aa06f1841a0fec031e2..7e9fb10c5c5400d743453b4e8f912fdfd9f1a1c2 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -923,20 +923,6 @@ class AutofillManagerTest : public testing::Test {
autofill_manager_->FillOrPreviewCreditCardForm(
AutofillDriver::FORM_DATA_ACTION_FILL, kDefaultPageID, *form,
form->fields[0], *card);
-
-#if defined(OS_IOS)
- // Filling out the entire form on iOS requires requesting autofill on each
- // of the form fields.
- autofill_manager_->FillOrPreviewCreditCardForm(
- AutofillDriver::FORM_DATA_ACTION_FILL, kDefaultPageID, *form,
- form->fields[1], *card);
- autofill_manager_->FillOrPreviewCreditCardForm(
- AutofillDriver::FORM_DATA_ACTION_FILL, kDefaultPageID, *form,
- form->fields[2], *card);
- autofill_manager_->FillOrPreviewCreditCardForm(
- AutofillDriver::FORM_DATA_ACTION_FILL, kDefaultPageID, *form,
- form->fields[3], *card);
-#endif // defined(OS_IOS)
}
// Convenience method to cast the FullCardRequest into a CardUnmaskDelegate.
@@ -1827,26 +1813,18 @@ TEST_F(AutofillManagerTest, WillFillCreditCardNumber) {
month_field = &form.fields[i];
}
- // Empty form - whole form is Autofilled (except on iOS).
+ // Empty form - whole form is Autofilled.
EXPECT_TRUE(WillFillCreditCardNumber(form, *number_field));
-#if defined(OS_IOS)
- EXPECT_FALSE(WillFillCreditCardNumber(form, *name_field));
-#else
EXPECT_TRUE(WillFillCreditCardNumber(form, *name_field));
-#endif // defined(OS_IOS)
// If the user has entered a value, it won't be overridden.
number_field->value = ASCIIToUTF16("gibberish");
EXPECT_TRUE(WillFillCreditCardNumber(form, *number_field));
EXPECT_FALSE(WillFillCreditCardNumber(form, *name_field));
- // But if that value is removed, it will be Autofilled (except on iOS).
+ // But if that value is removed, it will be Autofilled.
number_field->value.clear();
-#if defined(OS_IOS)
- EXPECT_FALSE(WillFillCreditCardNumber(form, *name_field));
-#else
EXPECT_TRUE(WillFillCreditCardNumber(form, *name_field));
-#endif // defined(OS_IOS)
// When part of the section is Autofilled, only fill the initiating field.
month_field->is_autofilled = true;
« no previous file with comments | « components/autofill/core/browser/autofill_manager.cc ('k') | components/autofill/core/common/autofill_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698