| Index: ios/chrome/browser/payments/payment_method_selection_coordinator_unittest.mm
|
| diff --git a/ios/chrome/browser/payments/payment_method_selection_coordinator_unittest.mm b/ios/chrome/browser/payments/payment_method_selection_coordinator_unittest.mm
|
| index e48a9721a98c9d19aadf947ab9620f2a1dad1dac..9f29a7073e4016be071bcae6f7a1c0daa891a8c1 100644
|
| --- a/ios/chrome/browser/payments/payment_method_selection_coordinator_unittest.mm
|
| +++ b/ios/chrome/browser/payments/payment_method_selection_coordinator_unittest.mm
|
| @@ -18,6 +18,10 @@
|
| #include "third_party/ocmock/OCMock/OCMock.h"
|
| #include "third_party/ocmock/gtest_support.h"
|
|
|
| +#if !defined(__has_feature) || !__has_feature(objc_arc)
|
| +#error "This file requires ARC support."
|
| +#endif
|
| +
|
| typedef PlatformTest PaymentMethodSelectionCoordinatorTest;
|
|
|
| // Tests that invoking start and stop on the coordinator presents and dismisses
|
| @@ -26,15 +30,14 @@ TEST(PaymentMethodSelectionCoordinatorTest, StartAndStop) {
|
| std::unique_ptr<PaymentRequest> payment_request =
|
| payment_request_test_util::CreateTestPaymentRequest();
|
|
|
| - UIViewController* base_view_controller =
|
| - [[[UIViewController alloc] init] autorelease];
|
| + UIViewController* base_view_controller = [[UIViewController alloc] init];
|
| UINavigationController* navigation_controller =
|
| - [[[UINavigationController alloc]
|
| - initWithRootViewController:base_view_controller] autorelease];
|
| + [[UINavigationController alloc]
|
| + initWithRootViewController:base_view_controller];
|
|
|
| PaymentMethodSelectionCoordinator* coordinator =
|
| - [[[PaymentMethodSelectionCoordinator alloc]
|
| - initWithBaseViewController:base_view_controller] autorelease];
|
| + [[PaymentMethodSelectionCoordinator alloc]
|
| + initWithBaseViewController:base_view_controller];
|
| [coordinator setPaymentRequest:payment_request.get()];
|
|
|
| EXPECT_EQ(1u, navigation_controller.viewControllers.count);
|
| @@ -62,15 +65,14 @@ TEST(PaymentMethodSelectionCoordinatorTest, DidSelectPaymentMethod) {
|
| std::unique_ptr<PaymentRequest> payment_request =
|
| payment_request_test_util::CreateTestPaymentRequest();
|
|
|
| - UIViewController* base_view_controller =
|
| - [[[UIViewController alloc] init] autorelease];
|
| + UIViewController* base_view_controller = [[UIViewController alloc] init];
|
| UINavigationController* navigation_controller =
|
| - [[[UINavigationController alloc]
|
| - initWithRootViewController:base_view_controller] autorelease];
|
| + [[UINavigationController alloc]
|
| + initWithRootViewController:base_view_controller];
|
|
|
| PaymentMethodSelectionCoordinator* coordinator =
|
| - [[[PaymentMethodSelectionCoordinator alloc]
|
| - initWithBaseViewController:base_view_controller] autorelease];
|
| + [[PaymentMethodSelectionCoordinator alloc]
|
| + initWithBaseViewController:base_view_controller];
|
| [coordinator setPaymentRequest:payment_request.get()];
|
|
|
| // Mock the coordinator delegate.
|
| @@ -108,15 +110,14 @@ TEST(PaymentMethodSelectionCoordinatorTest, DidReturn) {
|
| std::unique_ptr<PaymentRequest> payment_request =
|
| payment_request_test_util::CreateTestPaymentRequest();
|
|
|
| - UIViewController* base_view_controller =
|
| - [[[UIViewController alloc] init] autorelease];
|
| + UIViewController* base_view_controller = [[UIViewController alloc] init];
|
| UINavigationController* navigation_controller =
|
| - [[[UINavigationController alloc]
|
| - initWithRootViewController:base_view_controller] autorelease];
|
| + [[UINavigationController alloc]
|
| + initWithRootViewController:base_view_controller];
|
|
|
| PaymentMethodSelectionCoordinator* coordinator =
|
| - [[[PaymentMethodSelectionCoordinator alloc]
|
| - initWithBaseViewController:base_view_controller] autorelease];
|
| + [[PaymentMethodSelectionCoordinator alloc]
|
| + initWithBaseViewController:base_view_controller];
|
| [coordinator setPaymentRequest:payment_request.get()];
|
|
|
| // Mock the coordinator delegate.
|
|
|