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

Unified Diff: chrome/browser/autofill/select_control_handler_unittest.cc

Issue 6633001: Convert autofill messages to use the new IPC macros (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | « chrome/browser/autofill/select_control_handler.cc ('k') | chrome/browser/webdata/web_database.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/select_control_handler_unittest.cc
===================================================================
--- chrome/browser/autofill/select_control_handler_unittest.cc (revision 77285)
+++ chrome/browser/autofill/select_control_handler_unittest.cc (working copy)
@@ -19,15 +19,15 @@
options[i] = ASCIIToUTF16(kMonthsNumeric[i]);
webkit_glue::FormField field;
- field.set_form_control_type(ASCIIToUTF16("select-one"));
- field.set_option_strings(options);
+ field.form_control_type = ASCIIToUTF16("select-one");
+ field.option_strings = options;
CreditCard credit_card;
credit_card.SetInfo(AutofillType(CREDIT_CARD_EXP_MONTH), ASCIIToUTF16("01"));
autofill::FillSelectControl(credit_card,
AutofillType(CREDIT_CARD_EXP_MONTH),
&field);
- EXPECT_EQ(ASCIIToUTF16("01"), field.value());
+ EXPECT_EQ(ASCIIToUTF16("01"), field.value);
}
TEST(SelectControlHandlerTest, CreditCardMonthAbbreviated) {
@@ -40,15 +40,15 @@
options[i] = ASCIIToUTF16(kMonthsAbbreviated[i]);
webkit_glue::FormField field;
- field.set_form_control_type(ASCIIToUTF16("select-one"));
- field.set_option_strings(options);
+ field.form_control_type = ASCIIToUTF16("select-one");
+ field.option_strings = options;
CreditCard credit_card;
credit_card.SetInfo(AutofillType(CREDIT_CARD_EXP_MONTH), ASCIIToUTF16("01"));
autofill::FillSelectControl(credit_card,
AutofillType(CREDIT_CARD_EXP_MONTH),
&field);
- EXPECT_EQ(ASCIIToUTF16("Jan"), field.value());
+ EXPECT_EQ(ASCIIToUTF16("Jan"), field.value);
}
TEST(SelectControlHandlerTest, CreditCardMonthFull) {
@@ -61,15 +61,15 @@
options[i] = ASCIIToUTF16(kMonthsFull[i]);
webkit_glue::FormField field;
- field.set_form_control_type(ASCIIToUTF16("select-one"));
- field.set_option_strings(options);
+ field.form_control_type = ASCIIToUTF16("select-one");
+ field.option_strings = options;
CreditCard credit_card;
credit_card.SetInfo(AutofillType(CREDIT_CARD_EXP_MONTH), ASCIIToUTF16("01"));
autofill::FillSelectControl(credit_card,
AutofillType(CREDIT_CARD_EXP_MONTH),
&field);
- EXPECT_EQ(ASCIIToUTF16("January"), field.value());
+ EXPECT_EQ(ASCIIToUTF16("January"), field.value);
}
TEST(SelectControlHandlerTest, CreditCardMonthNumeric) {
@@ -81,15 +81,15 @@
options[i] = ASCIIToUTF16(kMonthsNumeric[i]);
webkit_glue::FormField field;
- field.set_form_control_type(ASCIIToUTF16("select-one"));
- field.set_option_strings(options);
+ field.form_control_type = ASCIIToUTF16("select-one");
+ field.option_strings = options;
CreditCard credit_card;
credit_card.SetInfo(AutofillType(CREDIT_CARD_EXP_MONTH), ASCIIToUTF16("01"));
autofill::FillSelectControl(credit_card,
AutofillType(CREDIT_CARD_EXP_MONTH),
&field);
- EXPECT_EQ(ASCIIToUTF16("1"), field.value());
+ EXPECT_EQ(ASCIIToUTF16("1"), field.value);
}
TEST(SelectControlHandlerTest, AddressCountryFull) {
@@ -101,15 +101,15 @@
options[i] = ASCIIToUTF16(kCountries[i]);
webkit_glue::FormField field;
- field.set_form_control_type(ASCIIToUTF16("select-one"));
- field.set_option_strings(options);
+ field.form_control_type = ASCIIToUTF16("select-one");
+ field.option_strings = options;
AutoFillProfile profile;
profile.SetInfo(AutofillType(ADDRESS_HOME_COUNTRY), ASCIIToUTF16("CA"));
autofill::FillSelectControl(profile,
AutofillType(ADDRESS_HOME_COUNTRY),
&field);
- EXPECT_EQ(ASCIIToUTF16("Canada"), field.value());
+ EXPECT_EQ(ASCIIToUTF16("Canada"), field.value);
}
TEST(SelectControlHandlerTest, AddressCountryAbbrev) {
@@ -121,15 +121,15 @@
options[i] = ASCIIToUTF16(kCountries[i]);
webkit_glue::FormField field;
- field.set_form_control_type(ASCIIToUTF16("select-one"));
- field.set_option_strings(options);
+ field.form_control_type = ASCIIToUTF16("select-one");
+ field.option_strings = options;
AutoFillProfile profile;
profile.SetInfo(AutofillType(ADDRESS_HOME_COUNTRY), ASCIIToUTF16("Canada"));
autofill::FillSelectControl(profile,
AutofillType(ADDRESS_HOME_COUNTRY),
&field);
- EXPECT_EQ(ASCIIToUTF16("CA"), field.value());
+ EXPECT_EQ(ASCIIToUTF16("CA"), field.value);
}
TEST(SelectControlHandlerTest, AddressStateFull) {
@@ -141,15 +141,15 @@
options[i] = ASCIIToUTF16(kStates[i]);
webkit_glue::FormField field;
- field.set_form_control_type(ASCIIToUTF16("select-one"));
- field.set_option_strings(options);
+ field.form_control_type = ASCIIToUTF16("select-one");
+ field.option_strings = options;
AutoFillProfile profile;
profile.SetInfo(AutofillType(ADDRESS_HOME_STATE), ASCIIToUTF16("CA"));
autofill::FillSelectControl(profile,
AutofillType(ADDRESS_HOME_STATE),
&field);
- EXPECT_EQ(ASCIIToUTF16("California"), field.value());
+ EXPECT_EQ(ASCIIToUTF16("California"), field.value);
}
TEST(SelectControlHandlerTest, AddressStateAbbrev) {
@@ -161,13 +161,13 @@
options[i] = ASCIIToUTF16(kStates[i]);
webkit_glue::FormField field;
- field.set_form_control_type(ASCIIToUTF16("select-one"));
- field.set_option_strings(options);
+ field.form_control_type = ASCIIToUTF16("select-one");
+ field.option_strings = options;
AutoFillProfile profile;
profile.SetInfo(AutofillType(ADDRESS_HOME_STATE), ASCIIToUTF16("California"));
autofill::FillSelectControl(profile,
AutofillType(ADDRESS_HOME_STATE),
&field);
- EXPECT_EQ(ASCIIToUTF16("CA"), field.value());
+ EXPECT_EQ(ASCIIToUTF16("CA"), field.value);
}
« no previous file with comments | « chrome/browser/autofill/select_control_handler.cc ('k') | chrome/browser/webdata/web_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698