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

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

Issue 2254983002: Remove test-only constructor from CreditCard. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use default constructor and nix guid include Created 4 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
Index: components/autofill/core/browser/autofill_external_delegate_unittest.cc
diff --git a/components/autofill/core/browser/autofill_external_delegate_unittest.cc b/components/autofill/core/browser/autofill_external_delegate_unittest.cc
index 41f58ec860f9755b6678ca333528d7f002c6cf46..7b274c61316bbd233247406f54985ba28b64c473 100644
--- a/components/autofill/core/browser/autofill_external_delegate_unittest.cc
+++ b/components/autofill/core/browser/autofill_external_delegate_unittest.cc
@@ -16,6 +16,7 @@
#include "build/build_config.h"
#include "components/autofill/core/browser/autofill_manager.h"
#include "components/autofill/core/browser/autofill_metrics.h"
+#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/popup_item_ids.h"
#include "components/autofill/core/browser/suggestion_test_helpers.h"
#include "components/autofill/core/browser/test_autofill_client.h"
@@ -621,8 +622,8 @@ MATCHER_P(CreditCardMatches, card, "") {
// Test that autofill manager will fill the credit card form after user scans a
// credit card.
TEST_F(AutofillExternalDelegateUnitTest, FillCreditCardForm) {
- CreditCard card(base::ASCIIToUTF16("test"), 1, 3000);
- card.SetRawInfo(CREDIT_CARD_NAME_FULL, base::ASCIIToUTF16("Alice"));
+ CreditCard card;
+ test::SetCreditCardInfo(&card, "Alice", "4111", "1", "3000");
EXPECT_CALL(*autofill_manager_,
FillCreditCardForm(_, _, _, CreditCardMatches(card), base::string16()));
external_delegate_->OnCreditCardScanned(card);

Powered by Google App Engine
This is Rietveld 408576698