Commit 70deb4f4 authored by thestig's avatar thestig Committed by Commit bot

Autofill: Recognize phone numbers in input fields of type number.

Improve PhoneFieldTest to test this.

Review URL: https://codereview.chromium.org/1031923003

Cr-Commit-Position: refs/heads/master@{#322446}
parent 1275e815
...@@ -11,4 +11,4 @@ ADDRESS_HOME_CITY | city | City * | | cardissuer_1-default ...@@ -11,4 +11,4 @@ ADDRESS_HOME_CITY | city | City * | | cardissuer_1-default
ADDRESS_HOME_STATE | state | State * | | cardissuer_1-default ADDRESS_HOME_STATE | state | State * | | cardissuer_1-default
ADDRESS_HOME_ZIP | zip | State * | | cardissuer_1-default ADDRESS_HOME_ZIP | zip | State * | | cardissuer_1-default
ADDRESS_HOME_COUNTRY | country | Country * | us | cardissuer_1-default ADDRESS_HOME_COUNTRY | country | Country * | us | cardissuer_1-default
UNKNOWN_TYPE | phonenumber | Mobile Phone* | | cardissuer_1-default PHONE_HOME_WHOLE_NUMBER | phonenumber | Mobile Phone* | | cardissuer_1-default
...@@ -278,7 +278,7 @@ bool PhoneField::ParsePhoneField(AutofillScanner* scanner, ...@@ -278,7 +278,7 @@ bool PhoneField::ParsePhoneField(AutofillScanner* scanner,
AutofillField** field) { AutofillField** field) {
return ParseFieldSpecifics(scanner, return ParseFieldSpecifics(scanner,
base::UTF8ToUTF16(regex), base::UTF8ToUTF16(regex),
MATCH_DEFAULT | MATCH_TELEPHONE, MATCH_DEFAULT | MATCH_TELEPHONE | MATCH_NUMBER,
field); field);
} }
......
...@@ -20,6 +20,7 @@ namespace { ...@@ -20,6 +20,7 @@ namespace {
const char* const kFieldTypes[] = { const char* const kFieldTypes[] = {
"text", "text",
"tel", "tel",
"number",
}; };
} // namespace } // namespace
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment