OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 <Foundation/Foundation.h> | 5 #import <Foundation/Foundation.h> |
6 #import <PassKit/PassKit.h> | 6 #import <PassKit/PassKit.h> |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 @end | 81 @end |
82 | 82 |
83 @interface BVCTestTabMock : OCMockComplexTypeHelper { | 83 @interface BVCTestTabMock : OCMockComplexTypeHelper { |
84 GURL url_; | 84 GURL url_; |
85 WebStateImpl* webState_; | 85 WebStateImpl* webState_; |
86 } | 86 } |
87 | 87 |
88 @property(nonatomic, assign) const GURL& url; | 88 @property(nonatomic, assign) const GURL& url; |
89 @property(nonatomic, assign) WebStateImpl* webState; | 89 @property(nonatomic, assign) WebStateImpl* webState; |
90 | 90 |
91 - (NavigationManagerImpl*)navigationManager; | 91 - (web::NavigationManager*)navigationManager; |
| 92 - (web::NavigationManagerImpl*)navigationManagerImpl; |
92 | 93 |
93 @end | 94 @end |
94 | 95 |
95 @implementation BVCTestTabMock | 96 @implementation BVCTestTabMock |
96 - (const GURL&)url { | 97 - (const GURL&)url { |
97 return url_; | 98 return url_; |
98 } | 99 } |
99 - (void)setUrl:(const GURL&)url { | 100 - (void)setUrl:(const GURL&)url { |
100 url_ = url; | 101 url_ = url; |
101 } | 102 } |
102 - (WebStateImpl*)webState { | 103 - (WebStateImpl*)webState { |
103 return webState_; | 104 return webState_; |
104 } | 105 } |
105 - (void)setWebState:(WebStateImpl*)webState { | 106 - (void)setWebState:(WebStateImpl*)webState { |
106 webState_ = webState; | 107 webState_ = webState; |
107 } | 108 } |
108 - (NavigationManagerImpl*)navigationManager { | 109 - (web::NavigationManager*)navigationManager { |
| 110 return &(webState_->GetNavigationManagerImpl()); |
| 111 } |
| 112 - (web::NavigationManagerImpl*)navigationManagerImpl { |
109 return &(webState_->GetNavigationManagerImpl()); | 113 return &(webState_->GetNavigationManagerImpl()); |
110 } | 114 } |
111 @end | 115 @end |
112 | 116 |
113 #pragma mark - | 117 #pragma mark - |
114 | 118 |
115 namespace { | 119 namespace { |
116 class BrowserViewControllerTest : public BlockCleanupTest { | 120 class BrowserViewControllerTest : public BlockCleanupTest { |
117 public: | 121 public: |
118 BrowserViewControllerTest() {} | 122 BrowserViewControllerTest() {} |
(...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
537 static_cast<OCMockObject*>(shareController_.get()); | 541 static_cast<OCMockObject*>(shareController_.get()); |
538 [[shareControllerMock expect] cancelShareAnimated:NO]; | 542 [[shareControllerMock expect] cancelShareAnimated:NO]; |
539 EXPECT_CALL(*this, OnCompletionCalled()); | 543 EXPECT_CALL(*this, OnCompletionCalled()); |
540 [bvc_ clearPresentedStateWithCompletion:^{ | 544 [bvc_ clearPresentedStateWithCompletion:^{ |
541 this->OnCompletionCalled(); | 545 this->OnCompletionCalled(); |
542 }]; | 546 }]; |
543 EXPECT_OCMOCK_VERIFY(shareControllerMock); | 547 EXPECT_OCMOCK_VERIFY(shareControllerMock); |
544 } | 548 } |
545 | 549 |
546 } // namespace | 550 } // namespace |
OLD | NEW |