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

Unified Diff: ios/chrome/browser/tabs/tab_unittest.mm

Issue 2685653002: Remove TabModel -replaceWebState: method. (Closed)
Patch Set: Fix indentation in the initializer. Created 3 years, 10 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/tabs/tab_private.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/tabs/tab_unittest.mm
diff --git a/ios/chrome/browser/tabs/tab_unittest.mm b/ios/chrome/browser/tabs/tab_unittest.mm
index f3924d59a5dc12aa195ddae2d07f65ee4680eee8..c611f47d9a23cd5fee916c84a4e2593faeb05d72 100644
--- a/ios/chrome/browser/tabs/tab_unittest.mm
+++ b/ios/chrome/browser/tabs/tab_unittest.mm
@@ -194,25 +194,21 @@ class TabTest : public BlockCleanupTest {
mock_web_controller_ =
[OCMockObject niceMockForClass:[CRWWebController class]];
- std::unique_ptr<WebStateImpl> web_state_impl;
- web_state_impl.reset(new WebStateImpl(browser_state));
+ auto web_state_impl = base::MakeUnique<WebStateImpl>(browser_state);
web_state_impl->SetWebController(mock_web_controller_);
web_state_impl->GetNavigationManagerImpl().InitializeSession(
@"window1", @"opener", NO, 0);
web_state_impl_ = web_state_impl.get();
- [[[(OCMockObject*)mock_web_controller_ stub]
+ [[[static_cast<OCMockObject*>(mock_web_controller_) stub]
andReturnValue:OCMOCK_VALUE(web_state_impl_)] webStateImpl];
web_controller_view_.reset([[UIView alloc] init]);
- [[[(OCMockObject*)mock_web_controller_ stub]
+ [[[static_cast<OCMockObject*>(mock_web_controller_) stub]
andReturn:web_controller_view_.get()] view];
- tab_.reset([[Tab alloc] initWithWindowName:nil
- opener:nullptr
- openedByDOM:NO
- model:nil
- browserState:browser_state]);
+ tab_.reset([[Tab alloc] initWithWebState:std::move(web_state_impl)
+ model:nil
+ attachTabHelpers:NO]);
web::NavigationManager::WebLoadParams params(GURL("chrome://version/"));
[[tab_ webController] loadWithParams:params];
- [tab_ replaceWebState:std::move(web_state_impl)];
// There should be no entries in the history at this point.
history::QueryResults results;
« no previous file with comments | « ios/chrome/browser/tabs/tab_private.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698