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

Unified Diff: ios/chrome/browser/ui/ntp/new_tab_page_controller_unittest.mm

Issue 2820063003: Fix NTP parentViewController. (Closed)
Patch Set: Fix tests Created 3 years, 8 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
« no previous file with comments | « ios/chrome/browser/ui/ntp/new_tab_page_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/ui/ntp/new_tab_page_controller_unittest.mm
diff --git a/ios/chrome/browser/ui/ntp/new_tab_page_controller_unittest.mm b/ios/chrome/browser/ui/ntp/new_tab_page_controller_unittest.mm
index 176c18ba76920401b2d445dd442e8be920a8704f..4c9125bb55373a0a83c5c86c52b0abdddb011b14 100644
--- a/ios/chrome/browser/ui/ntp/new_tab_page_controller_unittest.mm
+++ b/ios/chrome/browser/ui/ntp/new_tab_page_controller_unittest.mm
@@ -86,6 +86,7 @@ class NewTabPageControllerTest : public BlockCleanupTest {
ios::BookmarkModelFactory::GetForBrowserState(
chrome_browser_state_.get()));
GURL url(kChromeUINewTabURL);
+ parentViewController_ = [[UIViewController alloc] init];
controller_ =
[[NewTabPageController alloc] initWithUrl:url
loader:nil
@@ -94,23 +95,26 @@ class NewTabPageControllerTest : public BlockCleanupTest {
browserState:chrome_browser_state_.get()
colorCache:nil
webToolbarDelegate:nil
- tabModel:nil];
+ tabModel:nil
+ parentViewController:parentViewController_];
incognitoController_ = [[NewTabPageController alloc]
- initWithUrl:url
- loader:nil
- focuser:nil
- ntpObserver:nil
- browserState:chrome_browser_state_
- ->GetOffTheRecordChromeBrowserState()
- colorCache:nil
- webToolbarDelegate:nil
- tabModel:nil];
+ initWithUrl:url
+ loader:nil
+ focuser:nil
+ ntpObserver:nil
+ browserState:chrome_browser_state_
+ ->GetOffTheRecordChromeBrowserState()
+ colorCache:nil
+ webToolbarDelegate:nil
+ tabModel:nil
+ parentViewController:parentViewController_];
};
void TearDown() override {
incognitoController_ = nil;
controller_ = nil;
+ parentViewController_ = nil;
// There may be blocks released below that have weak references to |profile|
// owned by chrome_browser_state_. Ensure BlockCleanupTest::TearDown() is
@@ -122,6 +126,7 @@ class NewTabPageControllerTest : public BlockCleanupTest {
web::TestWebThreadBundle thread_bundle_;
IOSChromeScopedTestingLocalState local_state_;
std::unique_ptr<TestChromeBrowserState> chrome_browser_state_;
+ UIViewController* parentViewController_;
NewTabPageController* controller_;
NewTabPageController* incognitoController_;
};
« no previous file with comments | « ios/chrome/browser/ui/ntp/new_tab_page_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698