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

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

Issue 447903003: Autofill: improve GetCreditCardSuggestions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ah so there were tests after all Created 6 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 | « no previous file | components/autofill/core/browser/personal_data_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 31a70df5e52b6eb1968cdd9db162a03c6bbce202..5e2a68fa0781dfe20b3a2e7fa20d01766658fc3a 100644
--- a/components/autofill/core/browser/autofill_manager_unittest.cc
+++ b/components/autofill/core/browser/autofill_manager_unittest.cc
@@ -865,8 +865,8 @@ TEST_F(AutofillManagerTest, GetCreditCardSuggestionsEmptyValue) {
ASCIIToUTF16("************3456"),
ASCIIToUTF16("************8765")
};
- base::string16 expected_labels[] = { ASCIIToUTF16("*3456"),
- ASCIIToUTF16("*8765")};
+ base::string16 expected_labels[] = { ASCIIToUTF16("04/12"),
+ ASCIIToUTF16("10/14")};
base::string16 expected_icons[] = {
ASCIIToUTF16(kVisaCard),
ASCIIToUTF16(kMasterCard)
@@ -899,7 +899,7 @@ TEST_F(AutofillManagerTest, GetCreditCardSuggestionsMatchCharacter) {
// Test that we sent the right values to the external delegate.
base::string16 expected_values[] = {ASCIIToUTF16("************3456")};
- base::string16 expected_labels[] = {ASCIIToUTF16("*3456")};
+ base::string16 expected_labels[] = {ASCIIToUTF16("04/12")};
base::string16 expected_icons[] = {ASCIIToUTF16(kVisaCard)};
int expected_unique_ids[] = {autofill_manager_->GetPackedCreditCardID(4)};
external_delegate_->CheckSuggestions(
@@ -1008,7 +1008,7 @@ TEST_F(AutofillManagerTest, GetCreditCardSuggestionsRepeatedObfuscatedNumber) {
CreditCard* credit_card = new CreditCard;
test::SetCreditCardInfo(credit_card, "Elvis Presley",
"5231567890123456", // Mastercard
- "04", "2012");
+ "05", "2012");
credit_card->set_guid("00000000-0000-0000-0000-000000000007");
autofill_manager_->AddCreditCard(credit_card);
@@ -1032,9 +1032,9 @@ TEST_F(AutofillManagerTest, GetCreditCardSuggestionsRepeatedObfuscatedNumber) {
ASCIIToUTF16("************3456")
};
base::string16 expected_labels[] = {
- ASCIIToUTF16("*3456"),
- ASCIIToUTF16("*8765"),
- ASCIIToUTF16("*3456"),
+ ASCIIToUTF16("04/12"),
+ ASCIIToUTF16("10/14"),
+ ASCIIToUTF16("05/12"),
};
base::string16 expected_icons[] = {
ASCIIToUTF16(kVisaCard),
@@ -1095,8 +1095,8 @@ TEST_F(AutofillManagerTest, GetAddressAndCreditCardSuggestions) {
ASCIIToUTF16("************3456"),
ASCIIToUTF16("************8765")
};
- base::string16 expected_labels2[] = { ASCIIToUTF16("*3456"),
- ASCIIToUTF16("*8765")};
+ base::string16 expected_labels2[] = { ASCIIToUTF16("04/12"),
+ ASCIIToUTF16("10/14")};
base::string16 expected_icons2[] = {
ASCIIToUTF16(kVisaCard),
ASCIIToUTF16(kMasterCard)
« no previous file with comments | « no previous file | components/autofill/core/browser/personal_data_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698