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

Unified Diff: ios/chrome/browser/payments/shipping_address_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/shipping_address_selection_coordinator_unittest.mm
diff --git a/ios/chrome/browser/payments/shipping_address_selection_coordinator_unittest.mm b/ios/chrome/browser/payments/shipping_address_selection_coordinator_unittest.mm
index f4e0b0909e79f85177c72b839203b1d0dfc4cdc4..5cfcfefc6e828ae2c77251f449f6f01fd37ccc1c 100644
--- a/ios/chrome/browser/payments/shipping_address_selection_coordinator_unittest.mm
+++ b/ios/chrome/browser/payments/shipping_address_selection_coordinator_unittest.mm
@@ -17,6 +17,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 ShippingAddressSelectionCoordinatorTest;
// Tests that invoking start and stop on the coordinator presents and dismisses
@@ -25,15 +29,14 @@ TEST(ShippingAddressSelectionCoordinatorTest, 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];
ShippingAddressSelectionCoordinator* coordinator =
- [[[ShippingAddressSelectionCoordinator alloc]
- initWithBaseViewController:base_view_controller] autorelease];
+ [[ShippingAddressSelectionCoordinator alloc]
+ initWithBaseViewController:base_view_controller];
[coordinator setPaymentRequest:payment_request.get()];
EXPECT_EQ(1u, navigation_controller.viewControllers.count);
@@ -61,15 +64,14 @@ TEST(ShippingAddressSelectionCoordinatorTest, SelectedShippingAddress) {
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];
ShippingAddressSelectionCoordinator* coordinator =
- [[[ShippingAddressSelectionCoordinator alloc]
- initWithBaseViewController:base_view_controller] autorelease];
+ [[ShippingAddressSelectionCoordinator alloc]
+ initWithBaseViewController:base_view_controller];
[coordinator setPaymentRequest:payment_request.get()];
// Mock the coordinator delegate.
@@ -108,15 +110,14 @@ TEST(ShippingAddressSelectionCoordinatorTest, 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];
ShippingAddressSelectionCoordinator* coordinator =
- [[[ShippingAddressSelectionCoordinator alloc]
- initWithBaseViewController:base_view_controller] autorelease];
+ [[ShippingAddressSelectionCoordinator alloc]
+ initWithBaseViewController:base_view_controller];
[coordinator setPaymentRequest:payment_request.get()];
// Mock the coordinator delegate.

Powered by Google App Engine
This is Rietveld 408576698