summaryrefslogtreecommitdiffstats
path: root/content/browser/site_per_process_browsertest.cc
diff options
context:
space:
mode:
authorasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-13 18:35:04 +0000
committerasvitkine@chromium.org <asvitkine@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-13 18:35:04 +0000
commit6c3ce963b439d8de8822e65e6ab6216d8bf594e9 (patch)
treeb5b7de12ba68c938b084d09beaaee2c14f47ef87 /content/browser/site_per_process_browsertest.cc
parent88df6da77d3977d628b94a62c910b91c43ad8842 (diff)
downloadchromium_src-6c3ce963b439d8de8822e65e6ab6216d8bf594e9.zip
chromium_src-6c3ce963b439d8de8822e65e6ab6216d8bf594e9.tar.gz
chromium_src-6c3ce963b439d8de8822e65e6ab6216d8bf594e9.tar.bz2
Revert 250823 "With --site-per-process, avoid a crash when a sub..."
Speculative revert to see if the navigation changes here are causing sync_integration_tests to fail on: http://build.chromium.org/p/chromium.win/builders/Win7%20Sync%20x64/builds/11217 > With --site-per-process, avoid a crash when a subframe process goes away. > > We need to clear out the children of any nodes that are affected by the > crash, not the entire FrameTree. > > BUG=338508 > TEST=Killing an iframe process with --site-per-process shows a green rectangle. > R=ajwong@chromium.org, nasko@chromium.org > > Review URL: https://codereview.chromium.org/156303004 TBR=creis@chromium.org Review URL: https://codereview.chromium.org/163703004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@251090 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/browser/site_per_process_browsertest.cc')
-rw-r--r--content/browser/site_per_process_browsertest.cc62
1 files changed, 0 insertions, 62 deletions
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index e536cf6..0bade5ca 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -258,68 +258,6 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, CrossSiteIframe) {
child->current_frame_host()->GetProcess());
}
-// Crash a subframe and ensures its children are cleared from the FrameTree.
-// See http://crbug.com/338508.
-// TODO(creis): Enable this on Android when we can kill the process there.
-#if defined(OS_ANDROID)
-#define MAYBE_CrashSubframe DISABLED_CrashSubframe
-#else
-#define MAYBE_CrashSubframe CrashSubframe
-#endif
-IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, MAYBE_CrashSubframe) {
- host_resolver()->AddRule("*", "127.0.0.1");
- ASSERT_TRUE(test_server()->Start());
- GURL main_url(test_server()->GetURL("files/site_per_process_main.html"));
- NavigateToURL(shell(), main_url);
-
- StartFrameAtDataURL();
-
- // These must stay in scope with replace_host.
- GURL::Replacements replace_host;
- std::string foo_com("foo.com");
-
- // Load cross-site page into iframe.
- GURL cross_site_url(test_server()->GetURL("files/title2.html"));
- replace_host.SetHostStr(foo_com);
- cross_site_url = cross_site_url.ReplaceComponents(replace_host);
- EXPECT_TRUE(NavigateIframeToURL(shell(), cross_site_url, "test"));
-
- // Check the subframe process.
- FrameTreeNode* root =
- static_cast<WebContentsImpl*>(shell()->web_contents())->
- GetFrameTree()->root();
- ASSERT_EQ(1U, root->child_count());
- FrameTreeNode* child = root->child_at(0);
- EXPECT_NE(FrameTreeNode::kInvalidFrameId, root->frame_id());
- EXPECT_NE(FrameTreeNode::kInvalidFrameId, root->child_at(0)->frame_id());
-
- // Crash the subframe process.
- RenderProcessHost* root_process = root->current_frame_host()->GetProcess();
- RenderProcessHost* child_process = child->current_frame_host()->GetProcess();
- {
- RenderProcessHostWatcher crash_observer(
- child_process,
- RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
- base::KillProcess(child_process->GetHandle(), 0, false);
- crash_observer.Wait();
- }
-
- // Ensure that the child frame still exists but has been cleared.
- EXPECT_EQ(1U, root->child_count());
- EXPECT_EQ(FrameTreeNode::kInvalidFrameId, root->child_at(0)->frame_id());
-
- // Now crash the top-level page to clear the child frame.
- {
- RenderProcessHostWatcher crash_observer(
- root_process,
- RenderProcessHostWatcher::WATCH_FOR_PROCESS_EXIT);
- base::KillProcess(root_process->GetHandle(), 0, false);
- crash_observer.Wait();
- }
- EXPECT_EQ(0U, root->child_count());
- EXPECT_EQ(FrameTreeNode::kInvalidFrameId, root->frame_id());
-}
-
// TODO(nasko): Disable this test until out-of-process iframes is ready and the
// security checks are back in place.
// TODO(creis): Replace SpawnedTestServer with host_resolver to get test to run