| Index: components/autofill/content/browser/wallet/wallet_client_unittest.cc
|
| diff --git a/components/autofill/content/browser/wallet/wallet_client_unittest.cc b/components/autofill/content/browser/wallet/wallet_client_unittest.cc
|
| index 9360b950391c228adc419a00837ab0dde5d0686c..7885729483d97dafccc3acadb4b32a8c51bf086e 100644
|
| --- a/components/autofill/content/browser/wallet/wallet_client_unittest.cc
|
| +++ b/components/autofill/content/browser/wallet/wallet_client_unittest.cc
|
| @@ -453,15 +453,6 @@ const char kSendAutocheckoutStatusOfSuccessValidRequest[] =
|
| "\"success\":true"
|
| "}";
|
|
|
| -const char kSendAutocheckoutStatusWithStatisticsValidRequest[] =
|
| - "{"
|
| - "\"google_transaction_id\":\"google_transaction_id\","
|
| - "\"merchant_domain\":\"https://example.com/\","
|
| - "\"steps\":[{\"step_description\":\"1_AUTOCHECKOUT_STEP_SHIPPING\""
|
| - ",\"time_taken\":100}],"
|
| - "\"success\":true"
|
| - "}";
|
| -
|
| const char kSendAutocheckoutStatusOfFailureValidRequest[] =
|
| "{"
|
| "\"google_transaction_id\":\"google_transaction_id\","
|
| @@ -784,10 +775,8 @@ TEST_F(WalletClientTest, WalletError) {
|
| delegate_.ExpectWalletErrorMetric(
|
| AutofillMetrics::WALLET_SERVICE_UNAVAILABLE);
|
|
|
| - std::vector<AutocheckoutStatistic> statistics;
|
| wallet_client_->SendAutocheckoutStatus(autofill::SUCCESS,
|
| GURL(kMerchantUrl),
|
| - statistics,
|
| "google_transaction_id");
|
| VerifyAndFinishRequest(net::HTTP_INTERNAL_SERVER_ERROR,
|
| kSendAutocheckoutStatusOfSuccessValidRequest,
|
| @@ -801,10 +790,8 @@ TEST_F(WalletClientTest, WalletErrorResponseMissing) {
|
| delegate_.ExpectBaselineMetrics();
|
| delegate_.ExpectWalletErrorMetric(AutofillMetrics::WALLET_UNKNOWN_ERROR);
|
|
|
| - std::vector<AutocheckoutStatistic> statistics;
|
| wallet_client_->SendAutocheckoutStatus(autofill::SUCCESS,
|
| GURL(kMerchantUrl),
|
| - statistics,
|
| "google_transaction_id");
|
| VerifyAndFinishRequest(net::HTTP_INTERNAL_SERVER_ERROR,
|
| kSendAutocheckoutStatusOfSuccessValidRequest,
|
| @@ -817,10 +804,8 @@ TEST_F(WalletClientTest, NetworkFailureOnExpectedVoidResponse) {
|
| delegate_.ExpectBaselineMetrics();
|
| delegate_.ExpectWalletErrorMetric(AutofillMetrics::WALLET_NETWORK_ERROR);
|
|
|
| - std::vector<AutocheckoutStatistic> statistics;
|
| wallet_client_->SendAutocheckoutStatus(autofill::SUCCESS,
|
| GURL(kMerchantUrl),
|
| - statistics,
|
| "google_transaction_id");
|
| VerifyAndFinishRequest(net::HTTP_UNAUTHORIZED,
|
| kSendAutocheckoutStatusOfSuccessValidRequest,
|
| @@ -846,10 +831,8 @@ TEST_F(WalletClientTest, RequestError) {
|
| delegate_.ExpectBaselineMetrics();
|
| delegate_.ExpectWalletErrorMetric(AutofillMetrics::WALLET_BAD_REQUEST);
|
|
|
| - std::vector<AutocheckoutStatistic> statistics;
|
| wallet_client_->SendAutocheckoutStatus(autofill::SUCCESS,
|
| GURL(kMerchantUrl),
|
| - statistics,
|
| "google_transaction_id");
|
| VerifyAndFinishRequest(net::HTTP_BAD_REQUEST,
|
| kSendAutocheckoutStatusOfSuccessValidRequest,
|
| @@ -1480,18 +1463,11 @@ TEST_F(WalletClientTest, SendAutocheckoutOfStatusSuccess) {
|
| delegate_.ExpectLogWalletApiCallDuration(AutofillMetrics::SEND_STATUS, 1);
|
| delegate_.ExpectBaselineMetrics();
|
|
|
| - AutocheckoutStatistic statistic;
|
| - statistic.page_number = 1;
|
| - statistic.steps.push_back(AUTOCHECKOUT_STEP_SHIPPING);
|
| - statistic.time_taken = base::TimeDelta::FromMilliseconds(100);
|
| - std::vector<AutocheckoutStatistic> statistics;
|
| - statistics.push_back(statistic);
|
| wallet_client_->SendAutocheckoutStatus(autofill::SUCCESS,
|
| GURL(kMerchantUrl),
|
| - statistics,
|
| "google_transaction_id");
|
| VerifyAndFinishRequest(net::HTTP_OK,
|
| - kSendAutocheckoutStatusWithStatisticsValidRequest,
|
| + kSendAutocheckoutStatusOfSuccessValidRequest,
|
| ")]}"); // Invalid JSON. Should be ignored.
|
| }
|
|
|
| @@ -1499,10 +1475,8 @@ TEST_F(WalletClientTest, SendAutocheckoutStatusOfFailure) {
|
| delegate_.ExpectLogWalletApiCallDuration(AutofillMetrics::SEND_STATUS, 1);
|
| delegate_.ExpectBaselineMetrics();
|
|
|
| - std::vector<AutocheckoutStatistic> statistics;
|
| wallet_client_->SendAutocheckoutStatus(autofill::CANNOT_PROCEED,
|
| GURL(kMerchantUrl),
|
| - statistics,
|
| "google_transaction_id");
|
| VerifyAndFinishRequest(net::HTTP_OK,
|
| kSendAutocheckoutStatusOfFailureValidRequest,
|
|
|