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

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

Issue 17572015: Begin abstracting sending of IPC from autofill core code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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_common_test.cc
diff --git a/components/autofill/core/browser/autofill_common_test.cc b/components/autofill/core/browser/autofill_common_test.cc
index 3313c2360b40ca575f025fad970b61354b8005c0..42265cdb89226d5ca9733c5f2ed8b4eb7305793e 100644
--- a/components/autofill/core/browser/autofill_common_test.cc
+++ b/components/autofill/core/browser/autofill_common_test.cc
@@ -10,6 +10,7 @@
#include "components/autofill/core/browser/autofill_profile.h"
#include "components/autofill/core/browser/credit_card.h"
#include "components/autofill/core/common/autofill_pref_names.h"
+#include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/form_field_data.h"
#include "components/user_prefs/user_prefs.h"
#include "components/webdata/encryptor/encryptor.h"
@@ -35,6 +36,38 @@ void CreateTestFormField(const char* label,
field->form_control_type = type;
}
+void CreateTestAddressFormData(FormData* form) {
+ form->name = ASCIIToUTF16("MyForm");
+ form->method = ASCIIToUTF16("POST");
+ form->origin = GURL("http://myform.com/form.html");
+ form->action = GURL("http://myform.com/submit.html");
+ form->user_submitted = true;
+
+ FormFieldData field;
+ test::CreateTestFormField("First Name", "firstname", "", "text", &field);
+ form->fields.push_back(field);
+ test::CreateTestFormField("Middle Name", "middlename", "", "text", &field);
+ form->fields.push_back(field);
+ test::CreateTestFormField("Last Name", "lastname", "", "text", &field);
+ form->fields.push_back(field);
+ test::CreateTestFormField("Address Line 1", "addr1", "", "text", &field);
+ form->fields.push_back(field);
+ test::CreateTestFormField("Address Line 2", "addr2", "", "text", &field);
+ form->fields.push_back(field);
+ test::CreateTestFormField("City", "city", "", "text", &field);
+ form->fields.push_back(field);
+ test::CreateTestFormField("State", "state", "", "text", &field);
+ form->fields.push_back(field);
+ test::CreateTestFormField("Postal Code", "zipcode", "", "text", &field);
+ form->fields.push_back(field);
+ test::CreateTestFormField("Country", "country", "", "text", &field);
+ form->fields.push_back(field);
+ test::CreateTestFormField("Phone Number", "phonenumber", "", "tel", &field);
+ form->fields.push_back(field);
+ test::CreateTestFormField("Email", "email", "", "email", &field);
+ form->fields.push_back(field);
+}
+
inline void check_and_set(
FormGroup* profile, AutofillFieldType type, const char* value) {
if (value)
« no previous file with comments | « components/autofill/core/browser/autofill_common_test.h ('k') | components/autofill/core/browser/autofill_driver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698