| 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/content/browser/wallet/wallet_test_util.h" | 5 #include "components/autofill/content/browser/wallet/wallet_test_util.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 scoped_ptr<Instrument> GetTestInstrument() { | 99 scoped_ptr<Instrument> GetTestInstrument() { |
| 100 return scoped_ptr<Instrument>(new Instrument(ASCIIToUTF16("4444444444444448"), | 100 return scoped_ptr<Instrument>(new Instrument(ASCIIToUTF16("4444444444444448"), |
| 101 ASCIIToUTF16("123"), | 101 ASCIIToUTF16("123"), |
| 102 12, | 102 12, |
| 103 FutureYear(), | 103 FutureYear(), |
| 104 Instrument::VISA, | 104 Instrument::VISA, |
| 105 GetTestAddress())); | 105 GetTestAddress())); |
| 106 } | 106 } |
| 107 | 107 |
| 108 scoped_ptr<Instrument> GetTestAddressUpgradeInstrument() { |
| 109 scoped_ptr<Instrument> instrument(new Instrument(base::string16(), |
| 110 base::string16(), |
| 111 0, |
| 112 0, |
| 113 Instrument::UNKNOWN, |
| 114 GetTestAddress())); |
| 115 instrument->set_object_id("instrument_id"); |
| 116 return instrument.Pass(); |
| 117 } |
| 118 |
| 119 scoped_ptr<Instrument> GetTestExpirationDateChangeInstrument() { |
| 120 scoped_ptr<Instrument> instrument(new Instrument(base::string16(), |
| 121 ASCIIToUTF16("123"), |
| 122 12, |
| 123 FutureYear(), |
| 124 Instrument::UNKNOWN, |
| 125 scoped_ptr<Address>())); |
| 126 instrument->set_object_id("instrument_id"); |
| 127 return instrument.Pass(); |
| 128 } |
| 129 |
| 130 scoped_ptr<Instrument> GetTestAddressNameChangeInstrument() { |
| 131 scoped_ptr<Instrument> instrument(new Instrument(base::string16(), |
| 132 ASCIIToUTF16("123"), |
| 133 0, |
| 134 0, |
| 135 Instrument::UNKNOWN, |
| 136 GetTestAddress())); |
| 137 instrument->set_object_id("instrument_id"); |
| 138 return instrument.Pass(); |
| 139 } |
| 140 |
| 108 scoped_ptr<WalletItems::LegalDocument> GetTestLegalDocument() { | 141 scoped_ptr<WalletItems::LegalDocument> GetTestLegalDocument() { |
| 109 base::DictionaryValue dict; | 142 base::DictionaryValue dict; |
| 110 dict.SetString("legal_document_id", "document_id"); | 143 dict.SetString("legal_document_id", "document_id"); |
| 111 dict.SetString("display_name", "display_name"); | 144 dict.SetString("display_name", "display_name"); |
| 112 return wallet::WalletItems::LegalDocument::CreateLegalDocument(dict); | 145 return wallet::WalletItems::LegalDocument::CreateLegalDocument(dict); |
| 113 } | 146 } |
| 114 | 147 |
| 115 scoped_ptr<WalletItems::MaskedInstrument> GetTestMaskedInstrument() { | 148 scoped_ptr<WalletItems::MaskedInstrument> GetTestMaskedInstrument() { |
| 116 return GetTestMaskedInstrumentWithId("default_instrument_id"); | 149 return GetTestMaskedInstrumentWithId("default_instrument_id"); |
| 117 } | 150 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 return scoped_ptr<WalletItems>( | 214 return scoped_ptr<WalletItems>( |
| 182 new wallet::WalletItems(std::vector<RequiredAction>(), | 215 new wallet::WalletItems(std::vector<RequiredAction>(), |
| 183 "google_transaction_id", | 216 "google_transaction_id", |
| 184 "default_instrument_id", | 217 "default_instrument_id", |
| 185 "default_address_id", | 218 "default_address_id", |
| 186 "obfuscated_gaia_id")); | 219 "obfuscated_gaia_id")); |
| 187 } | 220 } |
| 188 | 221 |
| 189 } // namespace wallet | 222 } // namespace wallet |
| 190 } // namespace autofill | 223 } // namespace autofill |
| OLD | NEW |