Commit c6bbba8f authored by Rouslan Solomakhin's avatar Rouslan Solomakhin Committed by Commit Bot

[Web Payment] Deflake card ordering test.

This patch sets card use count and last use date
using PaymentPreferenceUtil instead of AutofillHelper,
because PaymentRequestImpl uses the counts and dates
from PaymentPreferenceUtil when calculating frecency
score for ordering cards.

Bug: 1045774
Change-Id: Ia58783d6889a670ccae057e68dc488013221ff89
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2031046Reviewed-by: default avatarSahel Sharify <sahel@chromium.org>
Commit-Queue: Rouslan Solomakhin <rouslan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#737124}
parent 4fb46772
...@@ -100,7 +100,9 @@ public class PaymentRequestMultiplePaymentInstrumentsTest implements MainActivit ...@@ -100,7 +100,9 @@ public class PaymentRequestMultiplePaymentInstrumentsTest implements MainActivit
// Set up the autofill payment instruments use stats. // Set up the autofill payment instruments use stats.
for (int i = 0; i < guids.size(); i++) { for (int i = 0; i < guids.size(); i++) {
helper.setCreditCardUseStatsForTesting(guids.get(i), mCountsToSet[i], mDatesToSet[i]); PaymentPreferencesUtil.setPaymentInstrumentUseCountForTest(
guids.get(i), mCountsToSet[i]);
PaymentPreferencesUtil.setPaymentInstrumentLastUseDate(guids.get(i), mDatesToSet[i]);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment