| 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 227578f4ad74439ad191f313f9fe50b84dbae63c..be43ab5f127b09597deae59d5830d593f4ecf847 100644
|
| --- a/components/autofill/core/browser/autofill_manager_unittest.cc
|
| +++ b/components/autofill/core/browser/autofill_manager_unittest.cc
|
| @@ -4148,12 +4148,19 @@ TEST_F(AutofillManagerTest, DontOfferToSavePaymentsCard) {
|
| form.fields[i].value = ASCIIToUTF16("2017");
|
| }
|
|
|
| - AutofillManager::UnmaskResponse response;
|
| + autofill_manager_->full_card_request()->GetFullCard(
|
| + card, AutofillClient::UNMASK_FOR_AUTOFILL,
|
| + autofill_manager_->weak_ptr_factory_.GetWeakPtr());
|
| +
|
| + CardUnmaskDelegate::UnmaskResponse response;
|
| response.should_store_pan = false;
|
| response.cvc = ASCIIToUTF16("123");
|
| - autofill_manager_->OnUnmaskResponse(response);
|
| - autofill_manager_->OnDidGetRealPan(AutofillClient::SUCCESS,
|
| - "4012888888881881");
|
| + ((CardUnmaskDelegate*)autofill_manager_->full_card_request())
|
| + ->OnUnmaskResponse(response);
|
| +
|
| + ((payments::PaymentsClientDelegate*)autofill_manager_->full_card_request())
|
| + ->OnDidGetRealPan(AutofillClient::SUCCESS, "4012888888881881");
|
| +
|
| autofill_manager_->OnFormSubmitted(form);
|
| }
|
|
|
| @@ -4162,21 +4169,16 @@ TEST_F(AutofillManagerTest, FillInUpdatedExpirationDate) {
|
| CreditCard card;
|
| PrepareForRealPanResponse(&form, &card);
|
|
|
| - AutofillManager::UnmaskResponse response;
|
| + CardUnmaskDelegate::UnmaskResponse response;
|
| response.should_store_pan = false;
|
| response.cvc = ASCIIToUTF16("123");
|
| response.exp_month = ASCIIToUTF16("02");
|
| response.exp_year = ASCIIToUTF16("2018");
|
| - autofill_manager_->OnUnmaskResponse(response);
|
| - autofill_manager_->OnDidGetRealPan(AutofillClient::SUCCESS,
|
| - "4012888888881881");
|
| -
|
| - EXPECT_EQ(ASCIIToUTF16("02"),
|
| - autofill_manager_->unmask_request_.card.GetRawInfo(
|
| - CREDIT_CARD_EXP_MONTH));
|
| - EXPECT_EQ(ASCIIToUTF16("2018"),
|
| - autofill_manager_->unmask_request_.card.GetRawInfo(
|
| - CREDIT_CARD_EXP_4_DIGIT_YEAR));
|
| + ((CardUnmaskDelegate*)autofill_manager_->full_card_request())
|
| + ->OnUnmaskResponse(response);
|
| +
|
| + ((payments::PaymentsClientDelegate*)autofill_manager_->full_card_request())
|
| + ->OnDidGetRealPan(AutofillClient::SUCCESS, "4012888888881881");
|
| }
|
|
|
| TEST_F(AutofillManagerTest, UploadCreditCard) {
|
|
|