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

Unified Diff: ios/chrome/browser/payments/payment_items_display_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_items_display_coordinator_unittest.mm
diff --git a/ios/chrome/browser/payments/payment_items_display_coordinator_unittest.mm b/ios/chrome/browser/payments/payment_items_display_coordinator_unittest.mm
index 127361f5a12a27b6b58a6a01ac8f3858fd8b9efd..e719300f589e1598a85ce9e11e453a70ed1ffa35 100644
--- a/ios/chrome/browser/payments/payment_items_display_coordinator_unittest.mm
+++ b/ios/chrome/browser/payments/payment_items_display_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 PaymentItemsDisplayCoordinatorTest;
// Tests that invoking start and stop on the coordinator presents and dismisses
@@ -26,15 +30,14 @@ TEST(PaymentItemsDisplayCoordinatorTest, 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];
PaymentItemsDisplayCoordinator* coordinator =
- [[[PaymentItemsDisplayCoordinator alloc]
- initWithBaseViewController:base_view_controller] autorelease];
+ [[PaymentItemsDisplayCoordinator alloc]
+ initWithBaseViewController:base_view_controller];
[coordinator setPaymentRequest:payment_request.get()];
EXPECT_EQ(1u, navigation_controller.viewControllers.count);
@@ -57,15 +60,14 @@ TEST(PaymentItemsDisplayCoordinatorTest, DidConfirm) {
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];
PaymentItemsDisplayCoordinator* coordinator =
- [[[PaymentItemsDisplayCoordinator alloc]
- initWithBaseViewController:base_view_controller] autorelease];
+ [[PaymentItemsDisplayCoordinator alloc]
+ initWithBaseViewController:base_view_controller];
[coordinator setPaymentRequest:payment_request.get()];
// Mock the coordinator delegate.
@@ -97,15 +99,14 @@ TEST(PaymentItemsDisplayCoordinatorTest, 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];
PaymentItemsDisplayCoordinator* coordinator =
- [[[PaymentItemsDisplayCoordinator alloc]
- initWithBaseViewController:base_view_controller] autorelease];
+ [[PaymentItemsDisplayCoordinator alloc]
+ initWithBaseViewController:base_view_controller];
[coordinator setPaymentRequest:payment_request.get()];
// Mock the coordinator delegate.
« no previous file with comments | « ios/chrome/browser/payments/BUILD.gn ('k') | ios/chrome/browser/payments/payment_items_display_view_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698