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

Unified Diff: components/autofill/browser/wallet/wallet_test_util.cc

Issue 15697010: Autofill:requestAutocomplete: Enable prompting for complete address when instrument being used does… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments addressed Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: components/autofill/browser/wallet/wallet_test_util.cc
diff --git a/components/autofill/browser/wallet/wallet_test_util.cc b/components/autofill/browser/wallet/wallet_test_util.cc
index f34e82a7f15d7788f32202565147dbae65490a67..896fa9136d7ad2f4f0b882596b51f4d88b3d99e8 100644
--- a/components/autofill/browser/wallet/wallet_test_util.cc
+++ b/components/autofill/browser/wallet/wallet_test_util.cc
@@ -28,8 +28,9 @@ int FutureYear() {
} // namespace
-scoped_ptr<WalletItems::MaskedInstrument> GetTestMaskedInstrumentWithId(
- const std::string& id) {
+scoped_ptr<WalletItems::MaskedInstrument>
+GetTestMaskedInstrumentWithIdAndAddress(
+ const std::string& id, scoped_ptr<Address> address) {
return scoped_ptr<WalletItems::MaskedInstrument>(
new WalletItems::MaskedInstrument(ASCIIToUTF16("descriptive_name"),
WalletItems::MaskedInstrument::VISA,
@@ -37,11 +38,16 @@ scoped_ptr<WalletItems::MaskedInstrument> GetTestMaskedInstrumentWithId(
ASCIIToUTF16("1111"),
12,
FutureYear(),
- GetTestAddress(),
+ address.Pass(),
WalletItems::MaskedInstrument::VALID,
id));
}
+scoped_ptr<WalletItems::MaskedInstrument> GetTestMaskedInstrumentWithId(
+ const std::string& id) {
+ return GetTestMaskedInstrumentWithIdAndAddress(id, GetTestAddress());
+}
+
scoped_ptr<Address> GetTestAddress() {
return scoped_ptr<Address>(new Address("US",
ASCIIToUTF16("recipient_name"),
@@ -54,6 +60,12 @@ scoped_ptr<Address> GetTestAddress() {
std::string()));
}
+scoped_ptr<Address> GetTestMinimalAddress() {
+ scoped_ptr<Address> address = GetTestAddress();
+ address->set_is_complete_address(false);
+ return address.Pass();
+}
+
scoped_ptr<FullWallet> GetTestFullWallet() {
base::Time::Exploded exploded;
base::Time::Now().LocalExplode(&exploded);

Powered by Google App Engine
This is Rietveld 408576698