Index: ios/chrome/browser/payments/payment_request_view_controller_unittest.mm |
diff --git a/ios/chrome/browser/payments/payment_request_view_controller_unittest.mm b/ios/chrome/browser/payments/payment_request_view_controller_unittest.mm |
index fdc5d9bc5da4f22511dc77826612a8a8d19a12ff..388c380ef1cbc4e874baaec7f67a0e2816e49815 100644 |
--- a/ios/chrome/browser/payments/payment_request_view_controller_unittest.mm |
+++ b/ios/chrome/browser/payments/payment_request_view_controller_unittest.mm |
@@ -10,10 +10,10 @@ |
#include "components/autofill/core/browser/autofill_test_utils.h" |
#include "components/autofill/core/browser/credit_card.h" |
#include "components/autofill/core/browser/test_personal_data_manager.h" |
+#import "ios/chrome/browser/payments/cells/autofill_profile_item.h" |
#import "ios/chrome/browser/payments/cells/page_info_item.h" |
#import "ios/chrome/browser/payments/cells/payment_method_item.h" |
#import "ios/chrome/browser/payments/cells/price_item.h" |
-#import "ios/chrome/browser/payments/cells/shipping_address_item.h" |
#include "ios/chrome/browser/payments/payment_request.h" |
#include "ios/chrome/browser/payments/payment_request_test_util.h" |
#import "ios/chrome/browser/ui/autofill/cells/status_item.h" |
@@ -73,7 +73,7 @@ TEST_F(PaymentRequestViewControllerTest, TestModel) { |
[GetPaymentRequestViewController() loadModel]; |
// There should be three sections in total. Summary, Shipping, and Payment. |
- ASSERT_EQ(3, NumberOfSections()); |
+ ASSERT_EQ(4, NumberOfSections()); |
// The only item in the Summary section should be of type PriceItem. |
ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(0))); |
@@ -86,10 +86,10 @@ TEST_F(PaymentRequestViewControllerTest, TestModel) { |
// There should be two items in the Shipping section. |
ASSERT_EQ(2U, static_cast<unsigned int>(NumberOfItemsInSection(1))); |
- // The first one should be of type ShippingAddressItem. |
+ // The first one should be of type AutofillProfileItem. |
item = GetCollectionViewItem(1, 0); |
- EXPECT_TRUE([item isMemberOfClass:[ShippingAddressItem class]]); |
- ShippingAddressItem* shipping_address_item = item; |
+ EXPECT_TRUE([item isMemberOfClass:[AutofillProfileItem class]]); |
+ AutofillProfileItem* shipping_address_item = item; |
EXPECT_EQ(MDCCollectionViewCellAccessoryDisclosureIndicator, |
shipping_address_item.accessoryType); |
@@ -104,6 +104,12 @@ TEST_F(PaymentRequestViewControllerTest, TestModel) { |
ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(2))); |
item = GetCollectionViewItem(2, 0); |
EXPECT_TRUE([item isMemberOfClass:[PaymentMethodItem class]]); |
+ |
+ // The only item in the Contact info section should be of type |
+ // AutofillProfileItem. |
+ ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(3))); |
+ item = GetCollectionViewItem(3, 0); |
+ EXPECT_TRUE([item isMemberOfClass:[AutofillProfileItem class]]); |
} |
// Tests that the correct items are displayed after loading the model, when |