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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 2786443003: Revert "Destroy the old RenderWidgetHostView when swapping out a main frame." (Closed)
Patch Set: 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: 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 ba4b4b1c63815cc2d910232028347097cdd0f3c7..418d46ba8e31093fbbc94e3e795f9ea083427c65 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -9423,81 +9423,6 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessNonIntegerScaleFactorBrowserTest,
gfx::Point(event_monitor.event().x, event_monitor.event().y));
}
-// This tests that we don't hide the RenderViewHost when reusing the
-// RenderViewHost for a subframe. See https://crbug.com/638375.
-IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, ReusedRenderViewNotHidden) {
- GURL a_url(embedded_test_server()->GetURL("a.com", "/title1.html"));
- GURL b_url_a_subframe(embedded_test_server()->GetURL(
- "b.com", "/cross_site_iframe_factory.html?b(a)"));
-
- EXPECT_TRUE(NavigateToURL(shell(), a_url));
-
- // Open a popup in a.com.
- Shell* popup = OpenPopup(shell(), a_url, "popup");
-
- // Navigate this popup to b.com with an a.com subframe.
- EXPECT_TRUE(NavigateToURL(popup, b_url_a_subframe));
-
- FrameTreeNode* root = static_cast<WebContentsImpl*>(popup->web_contents())
- ->GetFrameTree()
- ->root();
- FrameTreeNode* child_node = root->child_at(0);
-
- EXPECT_FALSE(child_node->current_frame_host()
- ->render_view_host()
- ->GetWidget()
- ->is_hidden());
-}
-
-IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
- RenderViewHostStaysActiveWithLateSwapoutACK) {
- EXPECT_TRUE(NavigateToURL(
- shell(), embedded_test_server()->GetURL("a.com", "/title1.html")));
-
- // Open a popup and navigate it to b.com.
- Shell* popup = OpenPopup(
- shell(), embedded_test_server()->GetURL("a.com", "/title2.html"), "foo");
-
- RenderFrameHostImpl* rfh =
- static_cast<RenderFrameHostImpl*>(popup->web_contents()->GetMainFrame());
- RenderViewHostImpl* rvh = rfh->render_view_host();
-
- // Disable the swapout ACK and the swapout timer.
- scoped_refptr<SwapoutACKMessageFilter> filter = new SwapoutACKMessageFilter();
- rfh->GetProcess()->AddFilter(filter.get());
- rfh->DisableSwapOutTimerForTesting();
-
- // Navigate popup to b.com. Because there's an opener, the RVH for a.com
- // stays around in swapped-out state.
- EXPECT_TRUE(NavigateToURL(
- popup, embedded_test_server()->GetURL("b.com", "/title3.html")));
- EXPECT_FALSE(rvh->is_active());
-
- // Kill the b.com process.
- RenderProcessHost* b_process =
- popup->web_contents()->GetMainFrame()->GetProcess();
- RenderProcessHostWatcher crash_observer(
- b_process, RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
- b_process->Shutdown(0, false);
- crash_observer.Wait();
-
- // Go back in the popup from b.com to a.com/title2.html. Because the current
- // b.com RFH is dead, the new RFH is committed right away (without waiting
- // for renderer to commit), so that users don't need to look at the sad tab.
- TestNavigationObserver back_observer(popup->web_contents());
- popup->web_contents()->GetController().GoBack();
-
- // Pretend that the original RFH in a.com now finishes running its unload
- // handler and sends the swapout ACK.
- rfh->OnSwappedOut();
-
- // Wait for the new a.com navigation to finish.
- back_observer.Wait();
-
- // The RVH for a.com should've been reused, and it should be active.
- EXPECT_TRUE(rvh->is_active());
-}
-
// Verify that a remote-to-local navigation in a crashed subframe works. See
// https://crbug.com/487872.
IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
« no previous file with comments | « content/browser/frame_host/render_frame_host_manager.cc ('k') | content/browser/web_contents/web_contents_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698