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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 1199313006: Disable support for swapped out RenderFrame(Host) on desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 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 d6f6ab1037cc214e6ac90c6ac0bd82832c4c7645..028320a08b7ef1be689cab7631fe98bfae440797 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -891,12 +891,15 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
root->child_at(0)->current_frame_host()->GetProcess();
RenderProcessHostWatcher crash_observer(
child_process, RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
+ LOG(ERROR) << "Process " << child_process->GetHandle() << " will crash";
child_process->Shutdown(0, false);
crash_observer.Wait();
// Navigate the second subframe to b.com to recreate the b.com process.
GURL b_url = embedded_test_server()->GetURL("b.com", "/post_message.html");
+ LOG(ERROR) << "Will navigate to " << b_url;
NavigateFrameToURL(root->child_at(1), b_url);
+ LOG(ERROR) << "Will navigate to " << b_url << " - complete";
// TODO(alexmos): This can be removed once TestFrameNavigationObserver is
// fixed to use DidFinishLoad.
EXPECT_TRUE(
@@ -988,6 +991,8 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
grandchild->render_manager()->GetRenderFrameProxyHost(b_site_instance);
EXPECT_FALSE(grandchild_rfph->is_render_frame_proxy_live());
+ LOG(ERROR) << "!!! Test will navigate subframe";
+
// Navigate the second subframe to b.com to recreate process B.
TestNavigationObserver observer(shell()->web_contents());
GURL b_url = embedded_test_server()->GetURL("b.com", "/title1.html");
@@ -997,6 +1002,7 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
// Ensure that the grandchild RenderFrameProxy in B was created when process
// B was restored.
+ LOG(ERROR) << "Will check RFPH for liveness:" << grandchild_rfph;
EXPECT_TRUE(grandchild_rfph->is_render_frame_proxy_live());
}
@@ -1016,7 +1022,9 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
KillingRendererClearsDescendantProxies) {
GURL main_url(embedded_test_server()->GetURL(
"a.com", "/frame_tree/page_with_two_frames_nested.html"));
+ LOG(ERROR) << ">>> Navigate to a.com with two frames";
NavigateToURL(shell(), main_url);
+ LOG(ERROR) << ">>> Navigate to a.com with two frames - complete";
// It is safe to obtain the root frame tree node here, as it doesn't change.
FrameTreeNode* root =
@@ -1068,8 +1076,10 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
root->child_at(0)->current_frame_host()->GetProcess();
RenderProcessHostWatcher crash_observer(
child_process_b, RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
+ LOG(ERROR) << ">>> Killing process " << child_process_b->GetHandle();
child_process_b->Shutdown(0, false);
crash_observer.Wait();
+ LOG(ERROR) << ">>> Killing process - complete";
// Make sure proxy C has gone from root.
// Make sure proxy C has gone from node3 as well.

Powered by Google App Engine
This is Rietveld 408576698