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

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: Rebase. Created 7 years, 5 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/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 bc4bbc8488f4067f88d63395a82c7926a0e0278e..3d16bd79898b631c82f06808ac555349ec3de927 100644
--- a/components/autofill/content/browser/wallet/full_wallet_unittest.cc
+++ b/components/autofill/content/browser/wallet/full_wallet_unittest.cc
@@ -501,5 +501,22 @@ TEST_F(FullWalletTest, GetCreditCardInfo) {
full_wallet.GetInfo(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(CREDIT_CARD_NUMBER));
+ EXPECT_EQ(ASCIIToUTF16("MasterCard"),
+ full_wallet->GetInfo(CREDIT_CARD_TYPE));
+ EXPECT_EQ(ASCIIToUTF16("123"),
+ full_wallet->GetInfo(CREDIT_CARD_VERIFICATION_CODE));
+ EXPECT_EQ(ASCIIToUTF16("11/12"),
+ full_wallet->GetInfo(CREDIT_CARD_EXP_DATE_2_DIGIT_YEAR));
Dan Beam 2013/08/06 03:38:17 nit: maybe test addresses?
aruslan 2013/08/07 18:21:16 Done.
+}
+
Dan Beam 2013/08/06 03:38:17 ^H
aruslan 2013/08/07 18:21:16 Done.
+
} // namespace wallet
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698