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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc

Issue 100743006: Fix DCHECK() when updating instruments with no phone number. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: dcheck Created 7 years 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: chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
index 68735ac72b4d4e0ea0a68a3f7fc40016fb881acd..bb282d0ba4705907b00dd722c79f6dc422602487 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
@@ -1428,7 +1428,10 @@ TEST_F(AutofillDialogControllerTest, SelectInstrument) {
TEST_F(AutofillDialogControllerTest, SaveAddress) {
EXPECT_CALL(*controller()->GetView(), ModelChanged());
EXPECT_CALL(*controller()->GetTestingWalletClient(),
- SaveToWalletMock(testing::IsNull(), testing::NotNull()));
+ SaveToWalletMock(testing::IsNull(),
+ testing::NotNull(),
+ testing::IsNull(),
+ testing::IsNull()));
scoped_ptr<wallet::WalletItems> wallet_items =
wallet::GetTestWalletItems(wallet::AMEX_DISALLOWED);
@@ -1450,7 +1453,10 @@ TEST_F(AutofillDialogControllerTest, SaveAddress) {
TEST_F(AutofillDialogControllerTest, SaveInstrument) {
EXPECT_CALL(*controller()->GetView(), ModelChanged());
EXPECT_CALL(*controller()->GetTestingWalletClient(),
- SaveToWalletMock(testing::NotNull(), testing::IsNull()));
+ SaveToWalletMock(testing::NotNull(),
+ testing::IsNull(),
+ testing::IsNull(),
+ testing::IsNull()));
FillCCBillingInputs();
scoped_ptr<wallet::WalletItems> wallet_items =
@@ -1462,7 +1468,10 @@ TEST_F(AutofillDialogControllerTest, SaveInstrument) {
TEST_F(AutofillDialogControllerTest, SaveInstrumentWithInvalidInstruments) {
EXPECT_CALL(*controller()->GetView(), ModelChanged());
EXPECT_CALL(*controller()->GetTestingWalletClient(),
- SaveToWalletMock(testing::NotNull(), testing::IsNull()));
+ SaveToWalletMock(testing::NotNull(),
+ testing::IsNull(),
+ testing::IsNull(),
+ testing::IsNull()));
FillCCBillingInputs();
scoped_ptr<wallet::WalletItems> wallet_items =
@@ -1474,7 +1483,10 @@ TEST_F(AutofillDialogControllerTest, SaveInstrumentWithInvalidInstruments) {
TEST_F(AutofillDialogControllerTest, SaveInstrumentAndAddress) {
EXPECT_CALL(*controller()->GetTestingWalletClient(),
- SaveToWalletMock(testing::NotNull(), testing::NotNull()));
+ SaveToWalletMock(testing::NotNull(),
+ testing::NotNull(),
+ testing::IsNull(),
+ testing::IsNull()));
FillCCBillingInputs();
scoped_ptr<wallet::WalletItems> wallet_items =
@@ -1494,7 +1506,10 @@ MATCHER(UsesLocalBillingAddress, "uses the local billing address") {
// matched shipping address, then a shipping address should be added.
TEST_F(AutofillDialogControllerTest, BillingForShipping) {
EXPECT_CALL(*controller()->GetTestingWalletClient(),
- SaveToWalletMock(testing::IsNull(), testing::NotNull()));
+ SaveToWalletMock(testing::IsNull(),
+ testing::NotNull(),
+ testing::IsNull(),
+ testing::IsNull()));
controller()->OnDidGetWalletItems(CompleteAndValidWalletItems());
// Select "Same as billing" in the address menu.
@@ -1507,7 +1522,7 @@ TEST_F(AutofillDialogControllerTest, BillingForShipping) {
// matched shipping address, then a shipping address should not be added.
TEST_F(AutofillDialogControllerTest, BillingForShippingHasMatch) {
EXPECT_CALL(*controller()->GetTestingWalletClient(),
- SaveToWalletMock(_, _)).Times(0);
+ SaveToWalletMock(_, _, _, _)).Times(0);
scoped_ptr<wallet::WalletItems> wallet_items =
wallet::GetTestWalletItems(wallet::AMEX_DISALLOWED);
@@ -1559,13 +1574,16 @@ TEST_F(AutofillDialogControllerTest, SaveInstrumentSameAsBilling) {
controller()->OnAccept();
EXPECT_CALL(*controller()->GetTestingWalletClient(),
- SaveToWalletMock(testing::NotNull(), UsesLocalBillingAddress()));
+ SaveToWalletMock(testing::NotNull(),
+ UsesLocalBillingAddress(),
+ testing::IsNull(),
+ testing::IsNull()));
AcceptAndLoadFakeFingerprint();
}
TEST_F(AutofillDialogControllerTest, CancelNoSave) {
EXPECT_CALL(*controller()->GetTestingWalletClient(),
- SaveToWalletMock(_, _)).Times(0);
+ SaveToWalletMock(_, _, _, _)).Times(0);
EXPECT_CALL(*controller()->GetView(), ModelChanged());

Powered by Google App Engine
This is Rietveld 408576698