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

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

Issue 22040002: [Autofill] Add a separate enumeration for HTML field type hints. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add docs Created 7 years, 4 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 a9ea5171e380a361e0018947c351ab4e10e1ad04..3d420237985a13476e75bf3da55ae1a7acdfbdc6 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -522,7 +522,7 @@ class TestAutofillManager : public AutofillManager {
expected_submitted_field_types_[i].begin();
it != expected_submitted_field_types_[i].end(); ++it) {
EXPECT_TRUE(possible_types.count(*it))
- << "Expected type: " << AutofillType::FieldTypeToString(*it);
+ << "Expected type: " << AutofillType(*it).ToString();
}
}
}
@@ -2652,7 +2652,7 @@ TEST_F(AutofillManagerTest, FormSubmittedServerTypes) {
std::vector<NativeFieldType> heuristic_types, server_types;
for (size_t i = 0; i < form.fields.size(); ++i) {
heuristic_types.push_back(UNKNOWN_TYPE);
- server_types.push_back(form_structure->field(i)->Type().native_type());
+ server_types.push_back(form_structure->field(i)->heuristic_type());
}
form_structure->SetFieldTypes(heuristic_types, server_types);
autofill_manager_->AddSeenForm(form_structure);
@@ -3166,7 +3166,7 @@ TEST_F(AutofillManagerTest, TestBubbleShown) {
std::vector<NativeFieldType> heuristic_types, server_types;
for (size_t i = 0; i < form.fields.size(); ++i) {
heuristic_types.push_back(UNKNOWN_TYPE);
- server_types.push_back(form_structure->field(i)->Type().native_type());
+ server_types.push_back(form_structure->field(i)->heuristic_type());
}
form_structure->SetFieldTypes(heuristic_types, server_types);
autofill_manager_->AddSeenForm(form_structure);
@@ -3195,7 +3195,7 @@ TEST_F(AutofillManagerTest, TestAutocheckoutBubbleNotShown) {
// Build form structure without server data.
std::vector<NativeFieldType> heuristic_types, server_types;
for (size_t i = 0; i < form.fields.size(); ++i) {
- heuristic_types.push_back(form_structure->field(i)->Type().native_type());
+ heuristic_types.push_back(form_structure->field(i)->heuristic_type());
server_types.push_back(NO_SERVER_DATA);
}
form_structure->SetFieldTypes(heuristic_types, server_types);
@@ -3240,7 +3240,7 @@ TEST_F(AutofillManagerTest, DynamicFormsSeenAndIgnored) {
std::vector<NativeFieldType> heuristic_types, server_types;
for (size_t i = 0; i < address.fields.size(); ++i) {
heuristic_types.push_back(UNKNOWN_TYPE);
- server_types.push_back(form_structure->field(i)->Type().native_type());
+ server_types.push_back(form_structure->field(i)->heuristic_type());
}
form_structure->SetFieldTypes(heuristic_types, server_types);
autofill_manager_->AddSeenForm(form_structure.release());

Powered by Google App Engine
This is Rietveld 408576698