| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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/payments/core/autofill_payment_instrument.h" | 5 #include "components/payments/core/autofill_payment_instrument.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/string16.h" | 8 #include "base/strings/string16.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "components/autofill/core/browser/autofill_profile.h" | 10 #include "components/autofill/core/browser/autofill_profile.h" |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 return &address_normalizer_; | 118 return &address_normalizer_; |
| 119 } | 119 } |
| 120 | 120 |
| 121 void CompleteFullCardRequest() { | 121 void CompleteFullCardRequest() { |
| 122 full_card_result_delegate_->OnFullCardRequestSucceeded( | 122 full_card_result_delegate_->OnFullCardRequestSucceeded( |
| 123 full_card_request_card_, base::ASCIIToUTF16("123")); | 123 full_card_request_card_, base::ASCIIToUTF16("123")); |
| 124 } | 124 } |
| 125 | 125 |
| 126 autofill::RegionDataLoader* GetRegionDataLoader() override { return nullptr; } | 126 autofill::RegionDataLoader* GetRegionDataLoader() override { return nullptr; } |
| 127 | 127 |
| 128 ukm::UkmService* GetUkmService() override { return nullptr; } | 128 ukm::UkmRecorder* GetUkmRecorder() override { return nullptr; } |
| 129 | 129 |
| 130 private: | 130 private: |
| 131 std::string locale_; | 131 std::string locale_; |
| 132 const GURL last_committed_url_; | 132 const GURL last_committed_url_; |
| 133 FakeAddressNormalizer address_normalizer_; | 133 FakeAddressNormalizer address_normalizer_; |
| 134 | 134 |
| 135 autofill::CreditCard full_card_request_card_; | 135 autofill::CreditCard full_card_request_card_; |
| 136 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> | 136 base::WeakPtr<autofill::payments::FullCardRequest::ResultDelegate> |
| 137 full_card_result_delegate_; | 137 full_card_result_delegate_; |
| 138 DISALLOW_COPY_AND_ASSIGN(FakePaymentRequestDelegate); | 138 DISALLOW_COPY_AND_ASSIGN(FakePaymentRequestDelegate); |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 delegate.CompleteFullCardRequest(); | 364 delegate.CompleteFullCardRequest(); |
| 365 EXPECT_FALSE(instrument_delegate.WasOnInstrumentDetailsReadyCalled()); | 365 EXPECT_FALSE(instrument_delegate.WasOnInstrumentDetailsReadyCalled()); |
| 366 EXPECT_FALSE(instrument_delegate.WasOnInstrumentDetailsErrorCalled()); | 366 EXPECT_FALSE(instrument_delegate.WasOnInstrumentDetailsErrorCalled()); |
| 367 | 367 |
| 368 delegate.test_address_normalizer()->CompleteAddressNormalization(); | 368 delegate.test_address_normalizer()->CompleteAddressNormalization(); |
| 369 EXPECT_TRUE(instrument_delegate.WasOnInstrumentDetailsReadyCalled()); | 369 EXPECT_TRUE(instrument_delegate.WasOnInstrumentDetailsReadyCalled()); |
| 370 EXPECT_FALSE(instrument_delegate.WasOnInstrumentDetailsErrorCalled()); | 370 EXPECT_FALSE(instrument_delegate.WasOnInstrumentDetailsErrorCalled()); |
| 371 } | 371 } |
| 372 | 372 |
| 373 } // namespace payments | 373 } // namespace payments |
| OLD | NEW |