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

Side by Side Diff: ios/chrome/test/app/stack_view_test_util.mm

Issue 2888173002: [ObjC ARC] Converts ios/chrome/test/app:test_support to ARC. (Closed)
Patch Set: tighten deps exclusion Created 3 years, 6 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/test/app/stack_view_test_util.h" 5 #import "ios/chrome/test/app/stack_view_test_util.h"
6 6
7 #import "base/mac/foundation_util.h" 7 #import "base/mac/foundation_util.h"
8 #import "ios/chrome/app/main_controller.h" 8 #import "ios/chrome/app/main_controller.h"
9 #import "ios/chrome/app/main_controller_private.h" 9 #import "ios/chrome/app/main_controller_private.h"
10 #import "ios/chrome/browser/ui/stack_view/stack_view_controller.h" 10 #import "ios/chrome/browser/ui/stack_view/stack_view_controller.h"
11 #import "ios/chrome/test/app/chrome_test_util.h" 11 #import "ios/chrome/test/app/chrome_test_util.h"
12 #import "ios/chrome/test/app/tab_test_util.h" 12 #import "ios/chrome/test/app/tab_test_util.h"
13 13
14 #if !defined(__has_feature) || !__has_feature(objc_arc)
15 #error "This file requires ARC support."
16 #endif
17
14 namespace chrome_test_util { 18 namespace chrome_test_util {
15 19
16 bool IsTabSwitcherActive() { 20 bool IsTabSwitcherActive() {
17 return [chrome_test_util::GetMainController() isTabSwitcherActive]; 21 return [chrome_test_util::GetMainController() isTabSwitcherActive];
18 } 22 }
19 23
20 StackViewController* GetStackViewController() { 24 StackViewController* GetStackViewController() {
21 if (!IsTabSwitcherActive()) 25 if (!IsTabSwitcherActive())
22 return nil; 26 return nil;
23 MainController* mainController = chrome_test_util::GetMainController(); 27 MainController* mainController = chrome_test_util::GetMainController();
24 DCHECK(mainController); 28 DCHECK(mainController);
25 return base::mac::ObjCCastStrict<StackViewController>( 29 return base::mac::ObjCCastStrict<StackViewController>(
26 [mainController tabSwitcherController]); 30 [mainController tabSwitcherController]);
27 } 31 }
28 32
29 } // namespace chrome_test_util 33 } // namespace chrome_test_util
OLDNEW
« no previous file with comments | « ios/chrome/test/app/signin_test_util.mm ('k') | ios/chrome/test/app/static_html_view_test_util.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698