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

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

Issue 1030073003: Autofill: Better recognize credit card type fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 9 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
« no previous file with comments | « components/autofill/core/browser/credit_card_field.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/credit_card_field_unittest.cc
diff --git a/components/autofill/core/browser/credit_card_field_unittest.cc b/components/autofill/core/browser/credit_card_field_unittest.cc
index 3e4f21c133b9d01c8214856a7590753dd14d8557..56ed3aeed95c21df61d9d4a3c89df6c2aa6d1184 100644
--- a/components/autofill/core/browser/credit_card_field_unittest.cc
+++ b/components/autofill/core/browser/credit_card_field_unittest.cc
@@ -117,10 +117,6 @@ TEST_F(CreditCardFieldTest, ParseFullCreditCard) {
FormFieldData field;
field.form_control_type = "text";
- field.label = ASCIIToUTF16("Card Type");
- field.name = ASCIIToUTF16("card_type");
- list_.push_back(new AutofillField(field, ASCIIToUTF16("type")));
-
field.label = ASCIIToUTF16("Name on Card");
field.name = ASCIIToUTF16("name_on_card");
list_.push_back(new AutofillField(field, ASCIIToUTF16("name")));
@@ -141,6 +137,13 @@ TEST_F(CreditCardFieldTest, ParseFullCreditCard) {
field.name = ASCIIToUTF16("verification");
list_.push_back(new AutofillField(field, ASCIIToUTF16("cvc")));
+ field.form_control_type = "select-one";
+ field.label = ASCIIToUTF16("Card Type");
+ field.name = ASCIIToUTF16("card_type");
+ field.option_contents.push_back(ASCIIToUTF16("visa"));
+ field.option_values.push_back(ASCIIToUTF16("visa"));
+ list_.push_back(new AutofillField(field, ASCIIToUTF16("type")));
+
Parse();
ASSERT_NE(nullptr, field_.get());
EXPECT_TRUE(ClassifyField());
« no previous file with comments | « components/autofill/core/browser/credit_card_field.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698