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

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

Issue 16254010: [Autofill] Update credit card type detection logic. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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 fc29c5f3049e2b508e5399a4b63982370c005418..c35a902d90bbe5cff5bf9cce8c2ece1b896cc584 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -1180,8 +1180,8 @@ TEST_F(AutofillManagerTest, GetCreditCardSuggestionsEmptyValue) {
base::string16 expected_labels[] = { ASCIIToUTF16("*3456"),
ASCIIToUTF16("*8765")};
base::string16 expected_icons[] = {
- ASCIIToUTF16("visaCC"),
- ASCIIToUTF16("genericCC")
+ ASCIIToUTF16(kVisaCard),
+ ASCIIToUTF16(kMasterCard)
};
int expected_unique_ids[] = {
autofill_manager_->GetPackedCreditCardID(4),
@@ -1220,7 +1220,7 @@ TEST_F(AutofillManagerTest, GetCreditCardSuggestionsMatchCharacter) {
base::string16 expected_values[] = {ASCIIToUTF16("************3456")};
base::string16 expected_labels[] = {ASCIIToUTF16("*3456")};
- base::string16 expected_icons[] = {ASCIIToUTF16("visaCC")};
+ base::string16 expected_icons[] = {ASCIIToUTF16(kVisaCard)};
int expected_unique_ids[] = {autofill_manager_->GetPackedCreditCardID(4)};
ExpectSuggestions(page_id, values, labels, icons, unique_ids,
kDefaultPageID, arraysize(expected_values), expected_values,
@@ -1259,8 +1259,8 @@ TEST_F(AutofillManagerTest, GetCreditCardSuggestionsNonCCNumber) {
base::string16 expected_labels[] = { ASCIIToUTF16("*3456"),
ASCIIToUTF16("*8765") };
base::string16 expected_icons[] = {
- ASCIIToUTF16("visaCC"),
- ASCIIToUTF16("genericCC")
+ ASCIIToUTF16(kVisaCard),
+ ASCIIToUTF16(kMasterCard)
};
int expected_unique_ids[] = {
autofill_manager_->GetPackedCreditCardID(4),
@@ -1383,9 +1383,9 @@ TEST_F(AutofillManagerTest, GetCreditCardSuggestionsRepeatedObfuscatedNumber) {
ASCIIToUTF16("*3456"),
};
base::string16 expected_icons[] = {
- ASCIIToUTF16("visaCC"),
- ASCIIToUTF16("genericCC"),
- ASCIIToUTF16("masterCardCC")
+ ASCIIToUTF16(kVisaCard),
+ ASCIIToUTF16(kMasterCard),
+ ASCIIToUTF16(kMasterCard)
};
int expected_unique_ids[] = {
autofill_manager_->GetPackedCreditCardID(4),
@@ -1456,8 +1456,8 @@ TEST_F(AutofillManagerTest, GetAddressAndCreditCardSuggestions) {
base::string16 expected_labels2[] = { ASCIIToUTF16("*3456"),
ASCIIToUTF16("*8765")};
base::string16 expected_icons2[] = {
- ASCIIToUTF16("visaCC"),
- ASCIIToUTF16("genericCC")
+ ASCIIToUTF16(kVisaCard),
+ ASCIIToUTF16(kMasterCard)
};
int expected_unique_ids2[] = {
autofill_manager_->GetPackedCreditCardID(4),
« no previous file with comments | « components/autofill/content/browser/wallet/wallet_items.cc ('k') | components/autofill/core/browser/credit_card.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698