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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 1722673003: PlzNavigate: fix 2 SitePerProcessBrowserTests that were using the pending RFH (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@navigation-policy
Patch Set: Created 4 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 | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/site_per_process_browsertest.cc
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index 24af2a89cafc7ca31f31f6bcd2e2ea655ccbc3ed..f672b0f914014a39883ff0236889eff25a898e1e 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -3956,7 +3956,9 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
TestNavigationObserver navigation_observer(shell()->web_contents());
shell()->LoadURL(a_url);
RenderViewHostImpl* pending_rvh =
- root->render_manager()->pending_render_view_host();
+ IsBrowserSideNavigationEnabled()
+ ? root->render_manager()->speculative_frame_host()->render_view_host()
+ : root->render_manager()->pending_render_view_host();
EXPECT_EQ(rvh->GetSiteInstance(), pending_rvh->GetSiteInstance());
EXPECT_NE(rvh, pending_rvh);
@@ -4785,11 +4787,15 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
// observer to ensure there is no crash when a new RenderFrame creation is
// attempted.
RenderProcessHost* process =
- node->render_manager()->pending_frame_host()->GetProcess();
+ IsBrowserSideNavigationEnabled()
+ ? node->render_manager()->speculative_frame_host()->GetProcess()
+ : node->render_manager()->pending_frame_host()->GetProcess();
RenderProcessHostWatcher watcher(
process, RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
int frame_routing_id =
- node->render_manager()->pending_frame_host()->GetRoutingID();
+ IsBrowserSideNavigationEnabled()
+ ? node->render_manager()->speculative_frame_host()->GetRoutingID()
+ : node->render_manager()->pending_frame_host()->GetRoutingID();
int proxy_routing_id =
node->render_manager()->GetProxyToParent()->GetRoutingID();
« no previous file with comments | « no previous file | testing/buildbot/filters/browser-side-navigation.linux.content_browsertests.filter » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698