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

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

Issue 2849523003: Add billing address as a mandatory field of Payments credit cards. (Closed)
Patch Set: Added AddressComboboxModel unittests and fixed more compile issues. Created 3 years, 8 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_manager_unittest.cc
diff --git a/components/autofill/core/browser/autofill_manager_unittest.cc b/components/autofill/core/browser/autofill_manager_unittest.cc
index 1b47591e27cbbd4fbd6c8d4de7868e50063a5eb1..234af02d5be74a6c7663df05fcc586240c44c469 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -233,7 +233,7 @@ class TestPersonalDataManager : public PersonalDataManager {
std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>();
test::SetCreditCardInfo(credit_card.get(), "Elvis Presley",
"4234 5678 9012 3456", // Visa
- "04", "2999");
+ "04", "2999", "1");
credit_card->set_guid("00000000-0000-0000-0000-000000000008");
local_credit_cards_.push_back(std::move(credit_card));
}
@@ -244,7 +244,7 @@ class TestPersonalDataManager : public PersonalDataManager {
std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>();
test::SetCreditCardInfo(credit_card.get(), "Elvis Presley",
"4234-5678-9012-3456", // Visa
- "04", "2999");
+ "04", "2999", "1");
credit_card->set_guid("00000000-0000-0000-0000-000000000009");
local_credit_cards_.push_back(std::move(credit_card));
}
@@ -254,7 +254,7 @@ class TestPersonalDataManager : public PersonalDataManager {
std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>();
test::SetCreditCardInfo(credit_card.get(), "Miku Hatsune",
"4234567890654321", // Visa
- month, year);
+ month, year, "1");
credit_card->set_guid("00000000-0000-0000-0000-000000000007");
local_credit_cards_.push_back(std::move(credit_card));
}
@@ -264,7 +264,7 @@ class TestPersonalDataManager : public PersonalDataManager {
std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>();
test::SetCreditCardInfo(credit_card.get(), "Homer Simpson",
"4234567890654321", // Visa
- "05", "2000");
+ "05", "2000", "1");
credit_card->set_guid("00000000-0000-0000-0000-000000000009");
local_credit_cards_.push_back(std::move(credit_card));
}
@@ -298,7 +298,7 @@ class TestPersonalDataManager : public PersonalDataManager {
std::unique_ptr<CreditCard> credit_card = base::MakeUnique<CreditCard>();
test::SetCreditCardInfo(credit_card.get(), "Elvis Presley",
"4234567890123456", // Visa
- "04", "2999");
+ "04", "2999", "1");
credit_card->set_guid("00000000-0000-0000-0000-000000000004");
credit_card->set_use_count(10);
credit_card->set_use_date(base::Time::Now() - base::TimeDelta::FromDays(5));
@@ -307,14 +307,14 @@ class TestPersonalDataManager : public PersonalDataManager {
credit_card = base::MakeUnique<CreditCard>();
test::SetCreditCardInfo(credit_card.get(), "Buddy Holly",
"5187654321098765", // Mastercard
- "10", "2998");
+ "10", "2998", "1");
credit_card->set_guid("00000000-0000-0000-0000-000000000005");
credit_card->set_use_count(5);
credit_card->set_use_date(base::Time::Now() - base::TimeDelta::FromDays(4));
credit_cards->push_back(std::move(credit_card));
credit_card = base::MakeUnique<CreditCard>();
- test::SetCreditCardInfo(credit_card.get(), "", "", "", "");
+ test::SetCreditCardInfo(credit_card.get(), "", "", "", "", "");
credit_card->set_guid("00000000-0000-0000-0000-000000000006");
credit_cards->push_back(std::move(credit_card));
}
@@ -1028,7 +1028,7 @@ class AutofillManagerTest : public testing::Test {
FormsSeen(std::vector<FormData>(1, *form));
*card = CreditCard(CreditCard::MASKED_SERVER_CARD, "a123");
test::SetCreditCardInfo(card, "John Dillinger", "1881" /* Visa */, "01",
- "2017");
+ "2017", "1");
card->SetNetworkForMaskedCard(kVisaCard);
EXPECT_CALL(*autofill_driver_, SendFormDataToRenderer(_, _, _))
@@ -1640,7 +1640,7 @@ TEST_F(AutofillManagerTest, GetCreditCardSuggestions_StopCharsWithInput) {
CreditCard credit_card;
test::SetCreditCardInfo(&credit_card, "John Smith",
"5255667890123123", // Mastercard
- "08", "2017");
+ "08", "2017", "1");
credit_card.set_guid("00000000-0000-0000-0000-000000000007");
autofill_manager_->AddCreditCard(credit_card);
@@ -1924,7 +1924,7 @@ TEST_F(AutofillManagerTest, GetCreditCardSuggestions_RepeatedObfuscatedNumber) {
CreditCard credit_card;
test::SetCreditCardInfo(&credit_card, "Elvis Presley",
"5231567890123456", // Mastercard
- "05", "2999");
+ "05", "2999", "1");
credit_card.set_guid("00000000-0000-0000-0000-000000000007");
credit_card.set_use_date(base::Time::Now() - base::TimeDelta::FromDays(15));
autofill_manager_->AddCreditCard(credit_card);
@@ -3876,7 +3876,7 @@ TEST_F(AutofillManagerTest, DeterminePossibleFieldTypesForUpload) {
std::vector<CreditCard> credit_cards;
CreditCard credit_card;
test::SetCreditCardInfo(&credit_card, "John Doe", "4234-5678-9012-3456", "04",
- "2999");
+ "2999", "1");
credit_card.set_guid("00000000-0000-0000-0000-000000000003");
credit_cards.push_back(credit_card);
@@ -4063,7 +4063,7 @@ TEST_F(AutofillManagerTest, DisambiguateUploadTypes) {
std::vector<CreditCard> credit_cards;
CreditCard credit_card;
test::SetCreditCardInfo(&credit_card, "Elvis Presley", "4234-5678-9012-3456",
- "04", "2999");
+ "04", "2999", "1");
credit_card.set_guid("00000000-0000-0000-0000-000000000003");
credit_cards.push_back(credit_card);

Powered by Google App Engine
This is Rietveld 408576698