| 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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 @implementation BVCTestTabModel { | 122 @implementation BVCTestTabModel { |
| 123 FakeWebStateListDelegate _webStateListDelegate; | 123 FakeWebStateListDelegate _webStateListDelegate; |
| 124 std::unique_ptr<WebStateList> _webStateList; | 124 std::unique_ptr<WebStateList> _webStateList; |
| 125 } | 125 } |
| 126 | 126 |
| 127 - (instancetype)init { | 127 - (instancetype)init { |
| 128 if ((self = [super | 128 if ((self = [super |
| 129 initWithRepresentedObject:[OCMockObject | 129 initWithRepresentedObject:[OCMockObject |
| 130 niceMockForClass:[TabModel class]]])) { | 130 niceMockForClass:[TabModel class]]])) { |
| 131 _webStateList = base::MakeUnique<WebStateList>(&_webStateListDelegate, | 131 _webStateList = base::MakeUnique<WebStateList>(&_webStateListDelegate); |
| 132 WebStateList::WebStateOwned); | |
| 133 } | 132 } |
| 134 return self; | 133 return self; |
| 135 } | 134 } |
| 136 | 135 |
| 137 - (WebStateList*)webStateList { | 136 - (WebStateList*)webStateList { |
| 138 return _webStateList.get(); | 137 return _webStateList.get(); |
| 139 } | 138 } |
| 140 @end | 139 @end |
| 141 | 140 |
| 142 #pragma mark - | 141 #pragma mark - |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 static_cast<OCMockObject*>(shareController_.get()); | 564 static_cast<OCMockObject*>(shareController_.get()); |
| 566 [[shareControllerMock expect] cancelShareAnimated:NO]; | 565 [[shareControllerMock expect] cancelShareAnimated:NO]; |
| 567 EXPECT_CALL(*this, OnCompletionCalled()); | 566 EXPECT_CALL(*this, OnCompletionCalled()); |
| 568 [bvc_ clearPresentedStateWithCompletion:^{ | 567 [bvc_ clearPresentedStateWithCompletion:^{ |
| 569 this->OnCompletionCalled(); | 568 this->OnCompletionCalled(); |
| 570 }]; | 569 }]; |
| 571 EXPECT_OCMOCK_VERIFY(shareControllerMock); | 570 EXPECT_OCMOCK_VERIFY(shareControllerMock); |
| 572 } | 571 } |
| 573 | 572 |
| 574 } // namespace | 573 } // namespace |
| OLD | NEW |