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

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: 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..facf4cd1552d241557c0fa119208c8c5f2f993dc 100644
--- a/components/autofill/core/browser/autofill_external_delegate_unittest.cc
+++ b/components/autofill/core/browser/autofill_external_delegate_unittest.cc
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/compiler_specific.h"
+#include "base/guid.h"
#include "base/macros.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string16.h"
@@ -621,8 +622,11 @@ 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);
+ CreditCard card(base::GenerateGUID(), std::string());
Evan Stade 2016/08/18 00:48:55 I'd suggest adding something to autofill_test_util
please use gerrit instead 2016/08/19 23:05:49 There's already autofill::test::SetCreditCardInfo(
card.SetRawInfo(CREDIT_CARD_NAME_FULL, base::ASCIIToUTF16("Alice"));
+ card.SetNumber(base::ASCIIToUTF16("4111"));
+ card.SetExpirationMonth(1);
+ card.SetExpirationYear(3000);
EXPECT_CALL(*autofill_manager_,
FillCreditCardForm(_, _, _, CreditCardMatches(card), base::string16()));
external_delegate_->OnCreditCardScanned(card);

Powered by Google App Engine
This is Rietveld 408576698