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

Unified Diff: ios/web/webui/crw_web_ui_manager_unittest.mm

Issue 2879413002: Pass NavigationContext to WebStateImpl::OnNavigationStarted. (Closed)
Patch Set: Fixed tests Created 3 years, 7 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/web/web_state/web_state_impl_unittest.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/webui/crw_web_ui_manager_unittest.mm
diff --git a/ios/web/webui/crw_web_ui_manager_unittest.mm b/ios/web/webui/crw_web_ui_manager_unittest.mm
index 787559083f9fee841b7a114937b3454bca7ca0e4..1dc2fcfb547c466c2da11f484d9118e54460b763 100644
--- a/ios/web/webui/crw_web_ui_manager_unittest.mm
+++ b/ios/web/webui/crw_web_ui_manager_unittest.mm
@@ -21,6 +21,7 @@
#import "ios/web/public/test/fakes/test_web_client.h"
#include "ios/web/public/test/scoped_testing_web_client.h"
#include "ios/web/public/test/web_test.h"
+#include "ios/web/web_state/navigation_context_impl.h"
#import "ios/web/web_state/web_state_impl.h"
#import "ios/web/webui/crw_web_ui_page_builder.h"
#import "ios/web/webui/url_fetcher_block_adapter.h"
@@ -146,7 +147,10 @@ TEST_F(CRWWebUIManagerTest, LoadWebUI) {
base::string16 html(base::SysNSStringToUTF16(kHtml));
GURL url(kTestWebUIUrl);
EXPECT_CALL(*web_state_impl_, LoadWebUIHtml(html, url));
- web_state_impl_->OnProvisionalNavigationStarted(url);
+ std::unique_ptr<web::NavigationContext> context =
+ NavigationContextImpl::CreateNavigationContext(web_state_impl_.get(),
+ url);
+ web_state_impl_->OnNavigationStarted(context.get());
}
// Tests that CRWWebUIManager responds to OnScriptCommandReceieved call and runs
« no previous file with comments | « ios/web/web_state/web_state_impl_unittest.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698