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

Side by Side Diff: components/autofill/content/browser/payments/payments_client_unittest.cc

Issue 2894333002: Pass active_chrome_experiments in payments RPC. (Closed)
Patch Set: Adds feature to active_chrome_experiments only if feature was triggered. Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | components/autofill/core/browser/autofill_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698