| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <map> | 5 #include <map> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/callback.h" | 9 #include "base/callback.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 1619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1630 scoped_ptr<wallet::WalletItems> wallet_items = | 1630 scoped_ptr<wallet::WalletItems> wallet_items = |
| 1631 wallet::GetTestWalletItems(wallet::AMEX_DISALLOWED); | 1631 wallet::GetTestWalletItems(wallet::AMEX_DISALLOWED); |
| 1632 SubmitWithWalletItems(wallet_items.Pass()); | 1632 SubmitWithWalletItems(wallet_items.Pass()); |
| 1633 } | 1633 } |
| 1634 | 1634 |
| 1635 MATCHER(IsUpdatingExistingData, "updating existing Wallet data") { | 1635 MATCHER(IsUpdatingExistingData, "updating existing Wallet data") { |
| 1636 return !arg->object_id().empty(); | 1636 return !arg->object_id().empty(); |
| 1637 } | 1637 } |
| 1638 | 1638 |
| 1639 MATCHER(UsesLocalBillingAddress, "uses the local billing address") { | 1639 MATCHER(UsesLocalBillingAddress, "uses the local billing address") { |
| 1640 return arg->address_line_1() == ASCIIToUTF16(kEditedBillingAddress); | 1640 return arg->street_address()[0] == ASCIIToUTF16(kEditedBillingAddress); |
| 1641 } | 1641 } |
| 1642 | 1642 |
| 1643 // Tests that when using billing address for shipping, and there is no exact | 1643 // Tests that when using billing address for shipping, and there is no exact |
| 1644 // matched shipping address, then a shipping address should be added. | 1644 // matched shipping address, then a shipping address should be added. |
| 1645 TEST_F(AutofillDialogControllerTest, BillingForShipping) { | 1645 TEST_F(AutofillDialogControllerTest, BillingForShipping) { |
| 1646 EXPECT_CALL(*controller()->GetTestingWalletClient(), | 1646 EXPECT_CALL(*controller()->GetTestingWalletClient(), |
| 1647 SaveToWalletMock(testing::IsNull(), | 1647 SaveToWalletMock(testing::IsNull(), |
| 1648 testing::NotNull(), | 1648 testing::NotNull(), |
| 1649 testing::IsNull(), | 1649 testing::IsNull(), |
| 1650 testing::IsNull())); | 1650 testing::IsNull())); |
| (...skipping 1439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3090 // Profiles saved while rules are unavailable shouldn't be verified. | 3090 // Profiles saved while rules are unavailable shouldn't be verified. |
| 3091 const AutofillProfile& imported_profile = | 3091 const AutofillProfile& imported_profile = |
| 3092 controller()->GetTestingManager()->imported_profile(); | 3092 controller()->GetTestingManager()->imported_profile(); |
| 3093 ASSERT_EQ(imported_profile.GetRawInfo(NAME_FULL), | 3093 ASSERT_EQ(imported_profile.GetRawInfo(NAME_FULL), |
| 3094 full_profile.GetRawInfo(NAME_FULL)); | 3094 full_profile.GetRawInfo(NAME_FULL)); |
| 3095 EXPECT_EQ(imported_profile.origin(), GURL(kSourceUrl).GetOrigin().spec()); | 3095 EXPECT_EQ(imported_profile.origin(), GURL(kSourceUrl).GetOrigin().spec()); |
| 3096 EXPECT_FALSE(imported_profile.IsVerified()); | 3096 EXPECT_FALSE(imported_profile.IsVerified()); |
| 3097 } | 3097 } |
| 3098 | 3098 |
| 3099 } // namespace autofill | 3099 } // namespace autofill |
| OLD | NEW |