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

Unified Diff: content/test/test_web_contents.cc

Issue 1156023006: Bring RFH/RVH unit tests closer to reality of how RF/RV are initialized (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move InitializeRenderFrameIfNeeded to RenderFrameHostTester and fix RlzLibTest code. Created 5 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 | « content/test/test_render_view_host.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_web_contents.cc
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index 26431327a47d02fb66459afcb3bf0a7eaa0a0133..2f35a8bc2fcdfca723ddc26d53f3a9128b502588 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -38,7 +38,6 @@ TestWebContents* TestWebContents::Create(BrowserContext* browser_context,
SiteInstance* instance) {
TestWebContents* test_web_contents = new TestWebContents(browser_context);
test_web_contents->Init(WebContents::CreateParams(browser_context, instance));
- test_web_contents->RenderFrameCreated(test_web_contents->GetMainFrame());
return test_web_contents;
}
@@ -106,9 +105,10 @@ void TestWebContents::TestDidNavigateWithReferrer(
params.is_post = false;
params.page_state = PageState::CreateFromURL(url);
- RenderFrameHostImpl* rfhi =
- static_cast<RenderFrameHostImpl*>(render_frame_host);
- rfhi->frame_tree_node()->navigator()->DidNavigate(rfhi, params);
+ TestRenderFrameHost* rfh =
+ static_cast<TestRenderFrameHost*>(render_frame_host);
+ rfh->InitializeRenderFrameIfNeeded();
+ rfh->frame_tree_node()->navigator()->DidNavigate(rfh, params);
}
const std::string& TestWebContents::GetSaveFrameHeaders() {
« no previous file with comments | « content/test/test_render_view_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698