| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/autofill_manager.h" | 5 #include "components/autofill/core/browser/autofill_manager.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 class TestPaymentsClient : public payments::PaymentsClient { | 87 class TestPaymentsClient : public payments::PaymentsClient { |
| 88 public: | 88 public: |
| 89 TestPaymentsClient(net::URLRequestContextGetter* context_getter, | 89 TestPaymentsClient(net::URLRequestContextGetter* context_getter, |
| 90 payments::PaymentsClientDelegate* delegate) | 90 payments::PaymentsClientDelegate* delegate) |
| 91 : PaymentsClient(context_getter, delegate), delegate_(delegate) {} | 91 : PaymentsClient(context_getter, delegate), delegate_(delegate) {} |
| 92 | 92 |
| 93 ~TestPaymentsClient() override {} | 93 ~TestPaymentsClient() override {} |
| 94 | 94 |
| 95 void GetUploadDetails(const std::string& app_locale) override { | 95 void GetUploadDetails(const std::vector<AutofillProfile>& addresses, |
| 96 const std::string& app_locale) override { |
| 96 delegate_->OnDidGetUploadDetails( | 97 delegate_->OnDidGetUploadDetails( |
| 97 app_locale == "en-US" ? AutofillClient::SUCCESS | 98 app_locale == "en-US" ? AutofillClient::SUCCESS |
| 98 : AutofillClient::PERMANENT_FAILURE, | 99 : AutofillClient::PERMANENT_FAILURE, |
| 99 ASCIIToUTF16("this is a context token"), | 100 ASCIIToUTF16("this is a context token"), |
| 100 std::unique_ptr<base::DictionaryValue>(nullptr)); | 101 std::unique_ptr<base::DictionaryValue>(nullptr)); |
| 101 } | 102 } |
| 102 | 103 |
| 103 void UploadCard(const payments::PaymentsClient::UploadRequestDetails& | 104 void UploadCard(const payments::PaymentsClient::UploadRequestDetails& |
| 104 request_details) override { | 105 request_details) override { |
| 105 delegate_->OnDidUploadCard(AutofillClient::SUCCESS); | 106 delegate_->OnDidUploadCard(AutofillClient::SUCCESS); |
| (...skipping 5107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5213 FormsSeen(mixed_forms); | 5214 FormsSeen(mixed_forms); |
| 5214 | 5215 |
| 5215 // Suggestions should always be displayed. | 5216 // Suggestions should always be displayed. |
| 5216 for (const FormFieldData& field : mixed_form.fields) { | 5217 for (const FormFieldData& field : mixed_form.fields) { |
| 5217 GetAutofillSuggestions(mixed_form, field); | 5218 GetAutofillSuggestions(mixed_form, field); |
| 5218 EXPECT_TRUE(external_delegate_->on_suggestions_returned_seen()); | 5219 EXPECT_TRUE(external_delegate_->on_suggestions_returned_seen()); |
| 5219 } | 5220 } |
| 5220 } | 5221 } |
| 5221 | 5222 |
| 5222 } // namespace autofill | 5223 } // namespace autofill |
| OLD | NEW |