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

Unified Diff: ios/chrome/browser/ui/alert_coordinator/action_sheet_coordinator_unittest.mm

Issue 2514843002: [ObjC ARC] Converts ios/chrome/browser/ui/alert_coordinator:unit_tests to ARC.Automatically gener… (Closed)
Patch Set: removed scoped_nsobject Created 4 years 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/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];

Powered by Google App Engine
This is Rietveld 408576698