Chromium Code Reviews| 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 96 | 96 |
| 97 scoped_ptr<Instrument> GetTestInstrument() { | 97 scoped_ptr<Instrument> GetTestInstrument() { |
| 98 return scoped_ptr<Instrument>(new Instrument(ASCIIToUTF16("4444444444444448"), | 98 return scoped_ptr<Instrument>(new Instrument(ASCIIToUTF16("4444444444444448"), |
| 99 ASCIIToUTF16("123"), | 99 ASCIIToUTF16("123"), |
| 100 12, | 100 12, |
| 101 FutureYear(), | 101 FutureYear(), |
| 102 Instrument::VISA, | 102 Instrument::VISA, |
| 103 GetTestAddress())); | 103 GetTestAddress())); |
| 104 } | 104 } |
| 105 | 105 |
| 106 scoped_ptr<Instrument> GetTestAddressUpgradeInstrument() { | |
| 107 scoped_ptr<Instrument> instrument(new Instrument(base::string16(), | |
| 108 base::string16(), | |
|
Dan Beam
2013/07/02 01:25:52
how can this CVC ever be empty in our code right n
ahutter
2013/07/02 15:44:23
Not sure... address upgrades should be possible wi
| |
| 109 0, | |
| 110 0, | |
| 111 Instrument::UNKNOWN, | |
| 112 GetTestAddress())); | |
| 113 instrument->set_object_id("instrument_id"); | |
| 114 return instrument.Pass(); | |
| 115 } | |
| 116 | |
| 117 scoped_ptr<Instrument> GetTestExpirationDateChangeInstrument() { | |
| 118 scoped_ptr<Instrument> instrument(new Instrument(base::string16(), | |
| 119 ASCIIToUTF16("123"), | |
| 120 12, | |
| 121 FutureYear(), | |
| 122 Instrument::UNKNOWN, | |
| 123 scoped_ptr<Address>())); | |
| 124 instrument->set_object_id("instrument_id"); | |
| 125 return instrument.Pass(); | |
| 126 } | |
| 127 | |
| 128 scoped_ptr<Instrument> GetTestAddressNameChangeInstrument() { | |
| 129 scoped_ptr<Instrument> instrument(new Instrument(base::string16(), | |
| 130 ASCIIToUTF16("123"), | |
| 131 0, | |
| 132 0, | |
| 133 Instrument::UNKNOWN, | |
| 134 GetTestAddress())); | |
| 135 instrument->set_object_id("instrument_id"); | |
| 136 return instrument.Pass(); | |
| 137 } | |
| 138 | |
| 106 scoped_ptr<WalletItems::LegalDocument> GetTestLegalDocument() { | 139 scoped_ptr<WalletItems::LegalDocument> GetTestLegalDocument() { |
| 107 base::DictionaryValue dict; | 140 base::DictionaryValue dict; |
| 108 dict.SetString("legal_document_id", "document_id"); | 141 dict.SetString("legal_document_id", "document_id"); |
| 109 dict.SetString("display_name", "display_name"); | 142 dict.SetString("display_name", "display_name"); |
| 110 return wallet::WalletItems::LegalDocument::CreateLegalDocument(dict); | 143 return wallet::WalletItems::LegalDocument::CreateLegalDocument(dict); |
| 111 } | 144 } |
| 112 | 145 |
| 113 scoped_ptr<WalletItems::MaskedInstrument> GetTestMaskedInstrument() { | 146 scoped_ptr<WalletItems::MaskedInstrument> GetTestMaskedInstrument() { |
| 114 return GetTestMaskedInstrumentWithId("default_instrument_id"); | 147 return GetTestMaskedInstrumentWithId("default_instrument_id"); |
| 115 } | 148 } |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 return scoped_ptr<WalletItems>( | 212 return scoped_ptr<WalletItems>( |
| 180 new wallet::WalletItems(std::vector<RequiredAction>(), | 213 new wallet::WalletItems(std::vector<RequiredAction>(), |
| 181 "google_transaction_id", | 214 "google_transaction_id", |
| 182 "default_instrument_id", | 215 "default_instrument_id", |
| 183 "default_address_id", | 216 "default_address_id", |
| 184 "obfuscated_gaia_id")); | 217 "obfuscated_gaia_id")); |
| 185 } | 218 } |
| 186 | 219 |
| 187 } // namespace wallet | 220 } // namespace wallet |
| 188 } // namespace autofill | 221 } // namespace autofill |
| OLD | NEW |