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

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

Issue 2755823002: Moved |openedByDOM| to WebState's CreateParams and public interface. (Closed)
Patch Set: BVC session controller cleanup Created 3 years, 9 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 45354be1be2d842ad436d25859b97fe9657a4c9b..afd069364fb0ecdfe6a045ca1153b4aa20c6cdd9 100644
--- a/ios/chrome/browser/ui/browser_view_controller_unittest.mm
+++ b/ios/chrome/browser/ui/browser_view_controller_unittest.mm
@@ -49,7 +49,6 @@
#include "ios/chrome/test/ios_chrome_scoped_testing_local_state.h"
#include "ios/chrome/test/testing_application_context.h"
#import "ios/testing/ocmock_complex_type_helper.h"
-#import "ios/web/navigation/crw_session_controller.h"
#include "ios/web/public/referrer.h"
#include "ios/web/public/test/test_web_thread_bundle.h"
#import "ios/web/public/web_state/ui/crw_native_content_provider.h"
@@ -171,13 +170,11 @@ void SetUp() override {
[[[currentTab stub] andReturn:dummyView] view];
[[[currentTab stub] andReturn:webControllerMock] webController];
- id sessionControllerMock =
- [OCMockObject niceMockForClass:[CRWSessionController class]];
- webStateImpl_.reset(new WebStateImpl(chrome_browser_state_.get()));
+ web::WebState::CreateParams params(chrome_browser_state_.get());
+ std::unique_ptr<web::WebState> webState = web::WebState::Create(params);
+ webStateImpl_.reset(static_cast<web::WebStateImpl*>(webState.release()));
[currentTab setWebState:webStateImpl_.get()];
webStateImpl_->SetWebController(webControllerMock);
- webStateImpl_->GetNavigationManagerImpl().SetSessionController(
- sessionControllerMock);
// Set up mock ShareController.
id shareController =

Powered by Google App Engine
This is Rietveld 408576698