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

Unified Diff: content/browser/site_per_process_browsertest.cc

Issue 1155393003: Update check in KillingRendererClearsDescendantProxies test. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 | « no previous file | no next file » | 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 f750a9d17b33eb503c0c3c54f209c01e70e5eb03..a843134b6166361873d71c7255e647f32043cac5 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_GT(site_instance_c->active_frame_count(), 0U);
+ EXPECT_TRUE(
+ 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()));
ncarter (slow) 2015/05/27 19:44:26 This EXPECT (and the one on line 1050) is redundan
}
// Crash a subframe and ensures its children are cleared from the FrameTree.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698