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

Side by Side Diff: components/autofill/content/browser/wallet/wallet_test_util.cc

Issue 20420002: Make Wallet respect whether or not shipping address is required. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Wallet client respects delegates shipping preference. Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « components/autofill/content/browser/wallet/wallet_test_util.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 "5ec4feecf9d6", 89 "5ec4feecf9d6",
90 GetTestAddress(), 90 GetTestAddress(),
91 GetTestShippingAddress(), 91 GetTestShippingAddress(),
92 std::vector<RequiredAction>())); 92 std::vector<RequiredAction>()));
93 std::vector<uint8> one_time_pad; 93 std::vector<uint8> one_time_pad;
94 base::HexStringToBytes("5F04A8704183", &one_time_pad); 94 base::HexStringToBytes("5F04A8704183", &one_time_pad);
95 wallet->set_one_time_pad(one_time_pad); 95 wallet->set_one_time_pad(one_time_pad);
96 return wallet.Pass(); 96 return wallet.Pass();
97 } 97 }
98 98
99 scoped_ptr<FullWallet> GetTestFullWalletInstrumentOnly() {
100 scoped_ptr<FullWallet> wallet(new FullWallet(FutureYear(),
101 12,
102 "528512",
103 "5ec4feecf9d6",
104 GetTestAddress(),
105 scoped_ptr<Address>(),
106 std::vector<RequiredAction>()));
107 std::vector<uint8> one_time_pad;
108 base::HexStringToBytes("5F04A8704183", &one_time_pad);
109 wallet->set_one_time_pad(one_time_pad);
110 return wallet.Pass();
111 }
112
99 scoped_ptr<Instrument> GetTestInstrument() { 113 scoped_ptr<Instrument> GetTestInstrument() {
100 return scoped_ptr<Instrument>(new Instrument(ASCIIToUTF16("4444444444444448"), 114 return scoped_ptr<Instrument>(new Instrument(ASCIIToUTF16("4444444444444448"),
101 ASCIIToUTF16("123"), 115 ASCIIToUTF16("123"),
102 12, 116 12,
103 FutureYear(), 117 FutureYear(),
104 Instrument::VISA, 118 Instrument::VISA,
105 GetTestAddress())); 119 GetTestAddress()));
106 } 120 }
107 121
108 scoped_ptr<Instrument> GetTestAddressUpgradeInstrument() { 122 scoped_ptr<Instrument> GetTestAddressUpgradeInstrument() {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 return scoped_ptr<WalletItems>( 228 return scoped_ptr<WalletItems>(
215 new wallet::WalletItems(std::vector<RequiredAction>(), 229 new wallet::WalletItems(std::vector<RequiredAction>(),
216 "google_transaction_id", 230 "google_transaction_id",
217 "default_instrument_id", 231 "default_instrument_id",
218 "default_address_id", 232 "default_address_id",
219 "obfuscated_gaia_id")); 233 "obfuscated_gaia_id"));
220 } 234 }
221 235
222 } // namespace wallet 236 } // namespace wallet
223 } // namespace autofill 237 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/browser/wallet/wallet_test_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698