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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 1148953014: Fix the commit type for out-of-process iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clear subframe pending entry. 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
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 f750a9d17b33eb503c0c3c54f209c01e70e5eb03..e5c51bc7af133c2381eddf30b0f7cc0456384bd8 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -1031,8 +1031,8 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
GURL site_c_url(embedded_test_server()->GetURL("baz.com", "/title1.html"));
EXPECT_EQ(site_c_url, node4->current_url());
- // |site_instance_c| is expected to go away once we kill |child_process_b|
- // below; refcount it to extend the lifetime.
+ // |site_instance_c|'s frames and proxies are expected to go away once we kill
+ // |child_process_b| below.
scoped_refptr<SiteInstanceImpl> site_instance_c =
node4->current_frame_host()->GetSiteInstance();
@@ -1046,6 +1046,10 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
" B = http://bar.com/\n"
" C = http://baz.com/",
DepictFrameTree(root));
+ EXPECT_EQ(0U, site_instance_c->active_frame_count());
+ EXPECT_FALSE(
+ root->render_manager()->GetRenderFrameProxyHost(site_instance_c.get()));
+
// Kill process B.
RenderProcessHost* child_process_b =
root->child_at(0)->current_frame_host()->GetProcess();
@@ -1065,7 +1069,9 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest,
" B = http://bar.com/ (no process)",
DepictFrameTree(root));
- EXPECT_TRUE(site_instance_c->HasOneRef());
+ EXPECT_EQ(0U, site_instance_c->active_frame_count());
+ EXPECT_FALSE(
+ root->render_manager()->GetRenderFrameProxyHost(site_instance_c.get()));
}
// Crash a subframe and ensures its children are cleared from the FrameTree.

Powered by Google App Engine
This is Rietveld 408576698