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

Side by Side Diff: ios/chrome/browser/payments/shipping_option_selection_view_controller_unittest.mm

Issue 2706193004: [ObjC ARC] Converts ios/chrome/browser/payments:unit_tests to ARC. (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « ios/chrome/browser/payments/shipping_option_selection_coordinator_unittest.mm ('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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 #import "ios/chrome/browser/payments/shipping_option_selection_view_controller.h " 5 #import "ios/chrome/browser/payments/shipping_option_selection_view_controller.h "
6 6
7 #include "base/mac/foundation_util.h" 7 #include "base/mac/foundation_util.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "components/autofill/core/browser/test_personal_data_manager.h" 10 #include "components/autofill/core/browser/test_personal_data_manager.h"
11 #import "ios/chrome/browser/payments/cells/payments_text_item.h" 11 #import "ios/chrome/browser/payments/cells/payments_text_item.h"
12 #include "ios/chrome/browser/payments/payment_request.h" 12 #include "ios/chrome/browser/payments/payment_request.h"
13 #import "ios/chrome/browser/payments/payment_request_test_util.h" 13 #import "ios/chrome/browser/payments/payment_request_test_util.h"
14 #import "ios/chrome/browser/ui/autofill/cells/status_item.h" 14 #import "ios/chrome/browser/ui/autofill/cells/status_item.h"
15 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h " 15 #import "ios/chrome/browser/ui/collection_view/cells/collection_view_text_item.h "
16 #import "ios/chrome/browser/ui/collection_view/collection_view_controller_test.h " 16 #import "ios/chrome/browser/ui/collection_view/collection_view_controller_test.h "
17 #include "ios/chrome/grit/ios_strings.h" 17 #include "ios/chrome/grit/ios_strings.h"
18 #include "ios/web/public/payments/payment_request.h" 18 #include "ios/web/public/payments/payment_request.h"
19 #include "testing/gtest/include/gtest/gtest.h" 19 #include "testing/gtest/include/gtest/gtest.h"
20 20
21 #if !defined(__has_feature) || !__has_feature(objc_arc)
22 #error "This file requires ARC support."
23 #endif
24
21 class ShippingOptionSelectionViewControllerTest 25 class ShippingOptionSelectionViewControllerTest
22 : public CollectionViewControllerTest { 26 : public CollectionViewControllerTest {
23 protected: 27 protected:
24 CollectionViewController* NewController() override NS_RETURNS_RETAINED { 28 CollectionViewController* NewController() override NS_RETURNS_RETAINED {
25 personal_data_manager_ = 29 personal_data_manager_ =
26 base::MakeUnique<autofill::TestPersonalDataManager>(); 30 base::MakeUnique<autofill::TestPersonalDataManager>();
27 31
28 web::PaymentRequest web_payment_request = 32 web::PaymentRequest web_payment_request =
29 payment_request_test_util::CreateTestWebPaymentRequest(); 33 payment_request_test_util::CreateTestWebPaymentRequest();
30 34
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 [GetShippingOptionSelectionViewController() loadModel]; 92 [GetShippingOptionSelectionViewController() loadModel];
89 93
90 ASSERT_EQ(1, NumberOfSections()); 94 ASSERT_EQ(1, NumberOfSections());
91 // There should be only one item. 95 // There should be only one item.
92 ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(0))); 96 ASSERT_EQ(1U, static_cast<unsigned int>(NumberOfItemsInSection(0)));
93 97
94 // The item should be of type StatusItem. 98 // The item should be of type StatusItem.
95 item = GetCollectionViewItem(0, 0); 99 item = GetCollectionViewItem(0, 0);
96 EXPECT_TRUE([item isMemberOfClass:[StatusItem class]]); 100 EXPECT_TRUE([item isMemberOfClass:[StatusItem class]]);
97 } 101 }
OLDNEW
« no previous file with comments | « ios/chrome/browser/payments/shipping_option_selection_coordinator_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698