OLD | NEW |
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/browser/ui/browser_view_controller_testing.h" | 5 #import "ios/chrome/browser/ui/browser_view_controller_testing.h" |
6 | 6 |
7 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" | 7 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller.h" |
8 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller_private.h" | 8 #import "ios/chrome/browser/ui/toolbar/web_toolbar_controller_private.h" |
9 | 9 |
| 10 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 11 #error "This file requires ARC support." |
| 12 #endif |
| 13 |
10 @interface BrowserViewController (Private) | 14 @interface BrowserViewController (Private) |
11 | 15 |
12 - (WebToolbarController*)toolbarController; | 16 - (WebToolbarController*)toolbarController; |
13 | 17 |
14 @end | 18 @end |
15 | 19 |
16 @implementation BrowserViewController (TestingAdditions) | 20 @implementation BrowserViewController (TestingAdditions) |
17 | 21 |
18 - (BOOL)testing_isLoading { | 22 - (BOOL)testing_isLoading { |
19 return [[self toolbarController] isLoading]; | 23 return [[self toolbarController] isLoading]; |
20 } | 24 } |
21 | 25 |
22 - (void)testing_focusOmnibox { | 26 - (void)testing_focusOmnibox { |
23 [[self toolbarController] focusOmnibox]; | 27 [[self toolbarController] focusOmnibox]; |
24 } | 28 } |
25 | 29 |
26 - (CGRect)testing_shareButtonAnchorRect { | 30 - (CGRect)testing_shareButtonAnchorRect { |
27 return [[self toolbarController] shareButtonAnchorRect]; | 31 return [[self toolbarController] shareButtonAnchorRect]; |
28 } | 32 } |
29 | 33 |
30 @end | 34 @end |
OLD | NEW |