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

Unified Diff: components/autofill/core/browser/payments/full_card_request_unittest.cc

Issue 2639403002: [Autofill] Remove direct use of base::Time::Now() in Autofill (Closed)
Patch Set: Rebase Created 3 years, 11 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/payments/full_card_request_unittest.cc
diff --git a/components/autofill/core/browser/payments/full_card_request_unittest.cc b/components/autofill/core/browser/payments/full_card_request_unittest.cc
index 480f71c8aa4e224e13e57648db0629419e99d02d..f18846b3e6131a8861b909da5a586a672f4db1e8 100644
--- a/components/autofill/core/browser/payments/full_card_request_unittest.cc
+++ b/components/autofill/core/browser/payments/full_card_request_unittest.cc
@@ -11,6 +11,7 @@
#include "base/strings/stringprintf.h"
#include "base/threading/thread_task_runner_handle.h"
#include "base/time/time.h"
+#include "components/autofill/core/browser/autofill_clock.h"
#include "components/autofill/core/browser/autofill_test_utils.h"
#include "components/autofill/core/browser/credit_card.h"
#include "components/autofill/core/browser/payments/payments_client.h"
@@ -226,7 +227,7 @@ TEST_F(FullCardRequestTest, GetFullCardPanAndCvcForExpiredFullServerCard) {
EXPECT_CALL(*client(), OnUnmaskVerificationResult(AutofillClient::SUCCESS));
base::Time::Exploded today;
- base::Time::Now().LocalExplode(&today);
+ AutofillClock::Now().LocalExplode(&today);
CreditCard full_server_card(CreditCard::FULL_SERVER_CARD, "server_id");
test::SetCreditCardInfo(&full_server_card, nullptr, "4111", "12",
base::StringPrintf("%d", today.year - 1).c_str());
@@ -431,7 +432,7 @@ TEST_F(FullCardRequestTest, UpdateExpDateForLocalCard) {
EXPECT_CALL(*client(), OnUnmaskVerificationResult(AutofillClient::SUCCESS));
base::Time::Exploded today;
- base::Time::Now().LocalExplode(&today);
+ AutofillClock::Now().LocalExplode(&today);
CreditCard card;
test::SetCreditCardInfo(&card, nullptr, "4111", "10",
base::StringPrintf("%d", today.year - 1).c_str());

Powered by Google App Engine
This is Rietveld 408576698