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

Side by Side Diff: components/autofill/core/browser/test_autofill_client.cc

Issue 2789843004: [Payments] Upload card UI now has a CVC prompt (Closed)
Patch Set: Update TestAutofillClient, create MockSaveCardBubbleController, add unit test Created 3 years, 8 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "components/autofill/core/browser/test_autofill_client.h" 5 #include "components/autofill/core/browser/test_autofill_client.h"
6 #include <components/autofill/core/browser/ui/mock_save_card_bubble_controller.h >
Mathieu 2017/04/04 23:49:20 include is wrong style
Jared Saul 2017/04/05 00:58:29 Wow, where'd I pull this from, haha. Nice catch.
6 7
7 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h" 8 #include "components/autofill/core/browser/webdata/autofill_webdata_service.h"
8 9
9 namespace autofill { 10 namespace autofill {
10 11
11 TestAutofillClient::TestAutofillClient() 12 TestAutofillClient::TestAutofillClient()
12 : token_service_(new FakeOAuth2TokenService()), 13 : token_service_(new FakeOAuth2TokenService()),
13 identity_provider_(new FakeIdentityProvider(token_service_.get())), 14 identity_provider_(new FakeIdentityProvider(token_service_.get())),
14 rappor_service_(new rappor::TestRapporServiceImpl()), 15 rappor_service_(new rappor::TestRapporServiceImpl()),
15 form_origin_(GURL("https://example.test")) {} 16 form_origin_(GURL("https://example.test")) {}
(...skipping 22 matching lines...) Expand all
38 } 39 }
39 40
40 rappor::RapporServiceImpl* TestAutofillClient::GetRapporServiceImpl() { 41 rappor::RapporServiceImpl* TestAutofillClient::GetRapporServiceImpl() {
41 return rappor_service_.get(); 42 return rappor_service_.get();
42 } 43 }
43 44
44 ukm::UkmService* TestAutofillClient::GetUkmService() { 45 ukm::UkmService* TestAutofillClient::GetUkmService() {
45 return ukm_service_test_harness_.test_ukm_service(); 46 return ukm_service_test_harness_.test_ukm_service();
46 } 47 }
47 48
49 SaveCardBubbleController* TestAutofillClient::GetSaveCardBubbleController() {
50 return new MockSaveCardBubbleController();
51 }
52
48 void TestAutofillClient::ShowAutofillSettings() { 53 void TestAutofillClient::ShowAutofillSettings() {
49 } 54 }
50 55
51 void TestAutofillClient::ShowUnmaskPrompt( 56 void TestAutofillClient::ShowUnmaskPrompt(
52 const CreditCard& card, 57 const CreditCard& card,
53 UnmaskCardReason reason, 58 UnmaskCardReason reason,
54 base::WeakPtr<CardUnmaskDelegate> delegate) { 59 base::WeakPtr<CardUnmaskDelegate> delegate) {
55 } 60 }
56 61
57 void TestAutofillClient::OnUnmaskVerificationResult(PaymentsRpcResult result) { 62 void TestAutofillClient::OnUnmaskVerificationResult(PaymentsRpcResult result) {
58 } 63 }
59 64
60 void TestAutofillClient::ConfirmSaveCreditCardLocally( 65 void TestAutofillClient::ConfirmSaveCreditCardLocally(
61 const CreditCard& card, 66 const CreditCard& card,
62 const base::Closure& callback) { 67 const base::Closure& callback) {
63 } 68 }
64 69
65 void TestAutofillClient::ConfirmSaveCreditCardToCloud( 70 void TestAutofillClient::ConfirmSaveCreditCardToCloud(
66 const CreditCard& card, 71 const CreditCard& card,
67 std::unique_ptr<base::DictionaryValue> legal_message, 72 std::unique_ptr<base::DictionaryValue> legal_message,
73 bool should_cvc_be_requested,
68 const base::Closure& callback) { 74 const base::Closure& callback) {
69 callback.Run(); 75 callback.Run();
70 } 76 }
71 77
72 void TestAutofillClient::ConfirmCreditCardFillAssist( 78 void TestAutofillClient::ConfirmCreditCardFillAssist(
73 const CreditCard& card, 79 const CreditCard& card,
74 const base::Closure& callback) { 80 const base::Closure& callback) {
75 callback.Run(); 81 callback.Run();
76 } 82 }
77 83
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 133
128 bool TestAutofillClient::ShouldShowSigninPromo() { 134 bool TestAutofillClient::ShouldShowSigninPromo() {
129 return false; 135 return false;
130 } 136 }
131 137
132 void TestAutofillClient::StartSigninFlow() {} 138 void TestAutofillClient::StartSigninFlow() {}
133 139
134 void TestAutofillClient::ShowHttpNotSecureExplanation() {} 140 void TestAutofillClient::ShowHttpNotSecureExplanation() {}
135 141
136 } // namespace autofill 142 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698