Index: ios/chrome/browser/ui/alert_coordinator/action_sheet_coordinator_unittest.mm |
diff --git a/ios/chrome/browser/ui/alert_coordinator/action_sheet_coordinator_unittest.mm b/ios/chrome/browser/ui/alert_coordinator/action_sheet_coordinator_unittest.mm |
index ee05e1d5d788d8a10263f74eac3fd237853f30c3..83eb94eeaf6ffc3dc24041df4e491b3f963338c7 100644 |
--- a/ios/chrome/browser/ui/alert_coordinator/action_sheet_coordinator_unittest.mm |
+++ b/ios/chrome/browser/ui/alert_coordinator/action_sheet_coordinator_unittest.mm |
@@ -9,27 +9,29 @@ |
#import "base/mac/foundation_util.h" |
#include "testing/platform_test.h" |
+#if !defined(__has_feature) || !__has_feature(objc_arc) |
+#error "This file requires ARC support." |
+#endif |
+ |
// Tests that if there is a popover, it uses the CGRect passed in init. |
TEST(ActionSheetCoordinatorTest, CGRectUsage) { |
// Setup. |
- UIWindow* window = [[[UIWindow alloc] |
- initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; |
+ UIWindow* window = |
+ [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; |
[window makeKeyAndVisible]; |
- UIViewController* viewController = |
- [[[UIViewController alloc] init] autorelease]; |
+ UIViewController* viewController = [[UIViewController alloc] init]; |
[window setRootViewController:viewController]; |
- UIView* view = |
- [[[UIView alloc] initWithFrame:viewController.view.bounds] autorelease]; |
+ UIView* view = [[UIView alloc] initWithFrame:viewController.view.bounds]; |
[viewController.view addSubview:view]; |
CGRect rect = CGRectMake(124, 432, 126, 63); |
- AlertCoordinator* alertCoordinator = [[[ActionSheetCoordinator alloc] |
- initWithBaseViewController:viewController |
- title:@"title" |
- message:nil |
- rect:rect |
- view:view] autorelease]; |
+ AlertCoordinator* alertCoordinator = |
+ [[ActionSheetCoordinator alloc] initWithBaseViewController:viewController |
+ title:@"title" |
+ message:nil |
+ rect:rect |
+ view:view]; |
// Action. |
[alertCoordinator start]; |