| 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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 template_url_service->Load(); | 256 template_url_service->Load(); |
| 257 | 257 |
| 258 // Force the view to load. | 258 // Force the view to load. |
| 259 UIWindow* window = [[UIWindow alloc] initWithFrame:CGRectZero]; | 259 UIWindow* window = [[UIWindow alloc] initWithFrame:CGRectZero]; |
| 260 [window addSubview:[bvc_ view]]; | 260 [window addSubview:[bvc_ view]]; |
| 261 window_.reset(window); | 261 window_.reset(window); |
| 262 } | 262 } |
| 263 | 263 |
| 264 void TearDown() override { | 264 void TearDown() override { |
| 265 [[bvc_ view] removeFromSuperview]; | 265 [[bvc_ view] removeFromSuperview]; |
| 266 [bvc_ shutdown]; | |
| 267 | |
| 268 BlockCleanupTest::TearDown(); | 266 BlockCleanupTest::TearDown(); |
| 269 } | 267 } |
| 270 | 268 |
| 271 base::scoped_nsobject<GenericChromeCommand> GetCommandWithTag(NSInteger tag) { | 269 base::scoped_nsobject<GenericChromeCommand> GetCommandWithTag(NSInteger tag) { |
| 272 base::scoped_nsobject<GenericChromeCommand> command( | 270 base::scoped_nsobject<GenericChromeCommand> command( |
| 273 [[GenericChromeCommand alloc] initWithTag:tag]); | 271 [[GenericChromeCommand alloc] initWithTag:tag]); |
| 274 return command; | 272 return command; |
| 275 } | 273 } |
| 276 | 274 |
| 277 MOCK_METHOD0(OnCompletionCalled, void()); | 275 MOCK_METHOD0(OnCompletionCalled, void()); |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 577 static_cast<OCMockObject*>(shareController_.get()); | 575 static_cast<OCMockObject*>(shareController_.get()); |
| 578 [[shareControllerMock expect] cancelShareAnimated:NO]; | 576 [[shareControllerMock expect] cancelShareAnimated:NO]; |
| 579 EXPECT_CALL(*this, OnCompletionCalled()); | 577 EXPECT_CALL(*this, OnCompletionCalled()); |
| 580 [bvc_ clearPresentedStateWithCompletion:^{ | 578 [bvc_ clearPresentedStateWithCompletion:^{ |
| 581 this->OnCompletionCalled(); | 579 this->OnCompletionCalled(); |
| 582 }]; | 580 }]; |
| 583 EXPECT_OCMOCK_VERIFY(shareControllerMock); | 581 EXPECT_OCMOCK_VERIFY(shareControllerMock); |
| 584 } | 582 } |
| 585 | 583 |
| 586 } // namespace | 584 } // namespace |
| OLD | NEW |