| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <utility> | 5 #include <utility> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/string_piece.h" | 10 #include "base/strings/string_piece.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 PaymentsClient::UnmaskRequestDetails request_details; | 80 PaymentsClient::UnmaskRequestDetails request_details; |
| 81 request_details.card = test::GetMaskedServerCard(); | 81 request_details.card = test::GetMaskedServerCard(); |
| 82 request_details.user_response.cvc = base::ASCIIToUTF16("123"); | 82 request_details.user_response.cvc = base::ASCIIToUTF16("123"); |
| 83 request_details.risk_data = "some risk data"; | 83 request_details.risk_data = "some risk data"; |
| 84 client_->UnmaskCard(request_details); | 84 client_->UnmaskCard(request_details); |
| 85 } | 85 } |
| 86 | 86 |
| 87 void StartGettingUploadDetails() { | 87 void StartGettingUploadDetails() { |
| 88 token_service_->AddAccount("example@gmail.com"); | 88 token_service_->AddAccount("example@gmail.com"); |
| 89 identity_provider_->LogIn("example@gmail.com"); | 89 identity_provider_->LogIn("example@gmail.com"); |
| 90 client_->GetUploadDetails(BuildTestProfiles(), "language-LOCALE"); | 90 client_->GetUploadDetails(BuildTestProfiles(), std::vector<const char*>(), |
| 91 "language-LOCALE"); |
| 91 } | 92 } |
| 92 | 93 |
| 93 void StartUploading() { | 94 void StartUploading() { |
| 94 token_service_->AddAccount("example@gmail.com"); | 95 token_service_->AddAccount("example@gmail.com"); |
| 95 identity_provider_->LogIn("example@gmail.com"); | 96 identity_provider_->LogIn("example@gmail.com"); |
| 96 PaymentsClient::UploadRequestDetails request_details; | 97 PaymentsClient::UploadRequestDetails request_details; |
| 97 request_details.card = test::GetCreditCard(); | 98 request_details.card = test::GetCreditCard(); |
| 98 request_details.cvc = base::ASCIIToUTF16("123"); | 99 request_details.cvc = base::ASCIIToUTF16("123"); |
| 99 request_details.context_token = base::ASCIIToUTF16("context token"); | 100 request_details.context_token = base::ASCIIToUTF16("context token"); |
| 100 request_details.risk_data = "some risk data"; | 101 request_details.risk_data = "some risk data"; |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 TEST_F(PaymentsClientTest, OtherError) { | 376 TEST_F(PaymentsClientTest, OtherError) { |
| 376 StartUnmasking(); | 377 StartUnmasking(); |
| 377 IssueOAuthToken(); | 378 IssueOAuthToken(); |
| 378 ReturnResponse(net::HTTP_FORBIDDEN, std::string()); | 379 ReturnResponse(net::HTTP_FORBIDDEN, std::string()); |
| 379 EXPECT_EQ(AutofillClient::PERMANENT_FAILURE, result_); | 380 EXPECT_EQ(AutofillClient::PERMANENT_FAILURE, result_); |
| 380 EXPECT_EQ("", real_pan_); | 381 EXPECT_EQ("", real_pan_); |
| 381 } | 382 } |
| 382 | 383 |
| 383 } // namespace autofill | 384 } // namespace autofill |
| 384 } // namespace payments | 385 } // namespace payments |
| OLD | NEW |