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

Unified Diff: chrome/browser/ui/autofill/data_model_wrapper_unittest.cc

Issue 22009003: [Autofill] Distinguish between native field types and potentially HTML field types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase 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: chrome/browser/ui/autofill/data_model_wrapper_unittest.cc
diff --git a/chrome/browser/ui/autofill/data_model_wrapper_unittest.cc b/chrome/browser/ui/autofill/data_model_wrapper_unittest.cc
index a1f27cea1f598c584a0bc8f42856ee94c1a0ca1a..724548a36030b85a59183a37b40c1f8bde198eb8 100644
--- a/chrome/browser/ui/autofill/data_model_wrapper_unittest.cc
+++ b/chrome/browser/ui/autofill/data_model_wrapper_unittest.cc
@@ -23,7 +23,8 @@ TEST(AutofillCreditCardWrapperTest, GetInfoCreditCardExpMonth) {
for (int month = 1; month <= 12; ++month) {
card.SetRawInfo(CREDIT_CARD_EXP_MONTH, base::IntToString16(month));
AutofillCreditCardWrapper wrapper(&card);
- EXPECT_EQ(model.GetItemAt(month), wrapper.GetInfo(CREDIT_CARD_EXP_MONTH));
+ EXPECT_EQ(model.GetItemAt(month),
+ wrapper.GetInfo(AutofillType(CREDIT_CARD_EXP_MONTH)));
}
}
@@ -61,7 +62,8 @@ TEST(WalletInstrumentWrapperTest, GetInfoCreditCardExpMonth) {
for (int month = 1; month <= 12; ++month) {
instrument->expiration_month_ = month;
WalletInstrumentWrapper wrapper(instrument.get());
- EXPECT_EQ(model.GetItemAt(month), wrapper.GetInfo(CREDIT_CARD_EXP_MONTH));
+ EXPECT_EQ(model.GetItemAt(month),
+ wrapper.GetInfo(AutofillType(CREDIT_CARD_EXP_MONTH)));
}
}
@@ -86,10 +88,13 @@ TEST(DataModelWrapperTest, GetDisplayTextEmptyWithoutPhone) {
const_cast<wallet::Address*>(&instrument->address())->set_phone_number(
string16());
- ASSERT_TRUE(instrument_wrapper.GetInfo(PHONE_HOME_WHOLE_NUMBER).empty());
+ ASSERT_TRUE(
+ instrument_wrapper.GetInfo(
+ AutofillType(PHONE_HOME_WHOLE_NUMBER)).empty());
EXPECT_TRUE(instrument_wrapper.GetDisplayText().empty());
- ASSERT_TRUE(address_wrapper.GetInfo(PHONE_HOME_WHOLE_NUMBER).empty());
+ ASSERT_TRUE(
+ address_wrapper.GetInfo(AutofillType(PHONE_HOME_WHOLE_NUMBER)).empty());
EXPECT_TRUE(address_wrapper.GetDisplayText().empty());
}
« no previous file with comments | « chrome/browser/ui/autofill/data_model_wrapper.cc ('k') | chrome/browser/ui/autofill/mock_autofill_dialog_view_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698