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

Unified Diff: ios/chrome/browser/ui/browser_view_controller_unittest.mm

Issue 2645653003: Expose thumbnails of pages to iOS share extensions. (Closed)
Patch Set: Addressed comments, fixed tests. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: ios/chrome/browser/ui/browser_view_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/browser_view_controller_unittest.mm b/ios/chrome/browser/ui/browser_view_controller_unittest.mm
index d31d8ee75a3f4bd1ea02fdc9ffc5338ac783c37e..0dae5c0d53da4f58cbad64a6b8d58dcb9c222285 100644
--- a/ios/chrome/browser/ui/browser_view_controller_unittest.mm
+++ b/ios/chrome/browser/ui/browser_view_controller_unittest.mm
@@ -406,13 +406,19 @@ TEST_F(BrowserViewControllerTest, TestSharePageCommandHandling) {
NSString* expectedTitle = @"title";
[(BVCTestTabMock*)tab_.get() setUrl:expectedUrl];
OCMockObject* tabMock = (OCMockObject*)tab_.get();
+ ios::ChromeBrowserState* ptr = chrome_browser_state_.get();
+ [[[tabMock stub] andReturnValue:OCMOCK_VALUE(ptr)] browserState];
[[[tabMock stub] andReturn:expectedTitle] title];
[[[tabMock stub] andReturn:expectedTitle] originalTitle];
+
base::scoped_nsobject<ShareToData> expectedShareData([[ShareToData alloc]
- initWithURL:expectedUrl
- title:expectedTitle
- isOriginalTitle:YES
- isPagePrintable:YES]);
+ initWithURL:expectedUrl
+ title:expectedTitle
+ isOriginalTitle:YES
+ isPagePrintable:NO
+ thumbnailGenerator:^UIImage*(CGSize const&) {
+ return nil;
+ }]);
OCMockObject* shareControllerMock = (OCMockObject*)shareController_.get();
// Passing non zero/nil |fromRect| and |inView| parameters to satisfy protocol
// requirements.

Powered by Google App Engine
This is Rietveld 408576698