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

Side by Side Diff: ios/chrome/app/safe_mode/safe_mode_coordinator_unittest.mm

Issue 2709513004: [ObjC ARC] Converts ios/chrome/app/safe_mode: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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "ios/chrome/app/safe_mode/safe_mode_coordinator.h" 5 #import "ios/chrome/app/safe_mode/safe_mode_coordinator.h"
6 6
7 #import <UIKit/UIKit.h> 7 #import <UIKit/UIKit.h>
8 8
9 #include "base/mac/scoped_nsobject.h"
10 #include "testing/gtest_mac.h" 9 #include "testing/gtest_mac.h"
sdefresne 2017/02/21 09:45:36 Can this be changed to the following? #include "t
stkhapugin 2017/02/21 12:23:04 Done.
11 10
11 #if !defined(__has_feature) || !__has_feature(objc_arc)
12 #error "This file requires ARC support."
13 #endif
14
12 TEST(SafeModeCoordinatorTest, RootVC) { 15 TEST(SafeModeCoordinatorTest, RootVC) {
13 // Expect that starting a safe mode coordinator will populate the root view 16 // Expect that starting a safe mode coordinator will populate the root view
14 // controller. 17 // controller.
15 base::scoped_nsobject<UIWindow> window( 18 UIWindow* window =
16 [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 100, 100)]); 19 [[UIWindow alloc] initWithFrame:CGRectMake(0, 0, 100, 100)];
17 EXPECT_TRUE([window rootViewController] == nil); 20 EXPECT_TRUE([window rootViewController] == nil);
18 base::scoped_nsobject<SafeModeCoordinator> safe_mode_coordinator( 21 SafeModeCoordinator* safe_mode_coordinator =
19 [[SafeModeCoordinator alloc] initWithWindow:window]); 22 [[SafeModeCoordinator alloc] initWithWindow:window];
20 [safe_mode_coordinator start]; 23 [safe_mode_coordinator start];
21 EXPECT_FALSE([window rootViewController] == nil); 24 EXPECT_FALSE([window rootViewController] == nil);
22 } 25 }
OLDNEW
« no previous file with comments | « ios/chrome/app/safe_mode/BUILD.gn ('k') | ios/chrome/app/safe_mode/safe_mode_view_controller_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698