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

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

Issue 1774153002: [Autofill] Add the phone extension type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and adapt heuristic output Created 4 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/form_structure.cc ('k') | components/autofill/core/browser/phone_field.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/form_structure_unittest.cc
diff --git a/components/autofill/core/browser/form_structure_unittest.cc b/components/autofill/core/browser/form_structure_unittest.cc
index a54f63672bfbabca7209c96047516471a8ee808c..0e866d2b1c05b436c4e05609525a9c60d1f9c8d7 100644
--- a/components/autofill/core/browser/form_structure_unittest.cc
+++ b/components/autofill/core/browser/form_structure_unittest.cc
@@ -406,7 +406,7 @@ TEST_F(FormStructureTest, HeuristicsContactInfo) {
// Expect the correct number of fields.
ASSERT_EQ(9U, form_structure->field_count());
- ASSERT_EQ(7U, form_structure->autofill_count());
+ ASSERT_EQ(8U, form_structure->autofill_count());
// First name.
EXPECT_EQ(NAME_FIRST, form_structure->field(0)->heuristic_type());
@@ -418,7 +418,7 @@ TEST_F(FormStructureTest, HeuristicsContactInfo) {
EXPECT_EQ(PHONE_HOME_WHOLE_NUMBER,
form_structure->field(3)->heuristic_type());
// Phone extension.
- EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(4)->heuristic_type());
+ EXPECT_EQ(PHONE_HOME_EXTENSION, form_structure->field(4)->heuristic_type());
// Address.
EXPECT_EQ(ADDRESS_HOME_LINE1, form_structure->field(5)->heuristic_type());
// City.
@@ -1653,7 +1653,7 @@ TEST_F(FormStructureTest, ThreePartPhoneNumber) {
form_structure->DetermineHeuristicTypes();
EXPECT_TRUE(form_structure->IsAutofillable());
ASSERT_EQ(4U, form_structure->field_count());
- ASSERT_EQ(3U, form_structure->autofill_count());
+ ASSERT_EQ(4U, form_structure->autofill_count());
// Area code.
EXPECT_EQ(PHONE_HOME_CITY_CODE, form_structure->field(0)->heuristic_type());
@@ -1663,8 +1663,8 @@ TEST_F(FormStructureTest, ThreePartPhoneNumber) {
// Phone number suffix.
EXPECT_EQ(PHONE_HOME_NUMBER,
form_structure->field(2)->heuristic_type());
- // Unknown.
- EXPECT_EQ(UNKNOWN_TYPE, form_structure->field(3)->heuristic_type());
+ // Phone extension.
+ EXPECT_EQ(PHONE_HOME_EXTENSION, form_structure->field(3)->heuristic_type());
}
TEST_F(FormStructureTest, HeuristicsInfernoCC) {
« no previous file with comments | « components/autofill/core/browser/form_structure.cc ('k') | components/autofill/core/browser/phone_field.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698