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

Unified Diff: ios/chrome/browser/payments/payment_method_selection_coordinator_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 side-by-side diff with in-line comments
Download patch
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.

Powered by Google App Engine
This is Rietveld 408576698