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

Unified Diff: components/autofill/content/browser/wallet/full_wallet_unittest.cc

Issue 21928004: Add a FullWallet constructor for data obtained from SDK. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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
« no previous file with comments | « components/autofill/content/browser/wallet/full_wallet.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/content/browser/wallet/full_wallet_unittest.cc
diff --git a/components/autofill/content/browser/wallet/full_wallet_unittest.cc b/components/autofill/content/browser/wallet/full_wallet_unittest.cc
index 5225bc479545e152d90ffc2c44d01695b3968228..6f662131ffd4bc56e170b7d1715bbe75af9fac80 100644
--- a/components/autofill/content/browser/wallet/full_wallet_unittest.cc
+++ b/components/autofill/content/browser/wallet/full_wallet_unittest.cc
@@ -505,5 +505,26 @@ TEST_F(FullWalletTest, GetCreditCardInfo) {
full_wallet.GetInfo(AutofillType(CREDIT_CARD_TYPE)));
}
+TEST_F(FullWalletTest, CreateFullWalletFromClearTextData) {
+ scoped_ptr<FullWallet> full_wallet =
+ FullWallet::CreateFullWalletFromClearText(
+ 11, 2012,
+ "5555555555554444", "123",
+ GetTestAddress(), GetTestShippingAddress());
+ EXPECT_EQ(ASCIIToUTF16("5555555555554444"),
+ full_wallet->GetInfo(AutofillType(CREDIT_CARD_NUMBER)));
+ EXPECT_EQ(ASCIIToUTF16("MasterCard"),
+ full_wallet->GetInfo(AutofillType(CREDIT_CARD_TYPE)));
+ EXPECT_EQ(ASCIIToUTF16("123"),
+ full_wallet->GetInfo(AutofillType(CREDIT_CARD_VERIFICATION_CODE)));
+ EXPECT_EQ(ASCIIToUTF16("11/12"),
+ full_wallet->GetInfo(
+ AutofillType(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR)));
+ EXPECT_TRUE(GetTestAddress()->EqualsIgnoreID(
+ *full_wallet->billing_address()));
+ EXPECT_TRUE(GetTestShippingAddress()->EqualsIgnoreID(
+ *full_wallet->shipping_address()));
+}
+
} // namespace wallet
} // namespace autofill
« no previous file with comments | « components/autofill/content/browser/wallet/full_wallet.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698