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

Side by Side Diff: content/browser/child_process_security_policy_browsertest.cc

Issue 740813004: Use StopChildProcess instead of base::KillProcess to kill a renderer process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update comments Created 6 years 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "content/browser/child_process_security_policy_impl.h" 9 #include "content/browser/child_process_security_policy_impl.h"
10 #include "content/browser/web_contents/web_contents_impl.h" 10 #include "content/browser/web_contents/web_contents_impl.h"
(...skipping 30 matching lines...) Expand all
41 IN_PROC_BROWSER_TEST_F(ChildProcessSecurityPolicyInProcessBrowserTest, NoLeak) { 41 IN_PROC_BROWSER_TEST_F(ChildProcessSecurityPolicyInProcessBrowserTest, NoLeak) {
42 #endif 42 #endif
43 GURL url = GetTestUrl("", "simple_page.html"); 43 GURL url = GetTestUrl("", "simple_page.html");
44 44
45 NavigateToURL(shell(), url); 45 NavigateToURL(shell(), url);
46 EXPECT_EQ( 46 EXPECT_EQ(
47 ChildProcessSecurityPolicyImpl::GetInstance()->security_state_.size(), 47 ChildProcessSecurityPolicyImpl::GetInstance()->security_state_.size(),
48 1U); 48 1U);
49 49
50 WebContents* web_contents = shell()->web_contents(); 50 WebContents* web_contents = shell()->web_contents();
51 base::KillProcess(web_contents->GetRenderProcessHost()->GetHandle(), 51 web_contents->GetRenderProcessHost()->Shutdown(RESULT_CODE_KILLED, true);
52 RESULT_CODE_KILLED, true);
53 52
54 web_contents->GetController().Reload(true); 53 web_contents->GetController().Reload(true);
55 EXPECT_EQ( 54 EXPECT_EQ(
56 1U, 55 1U,
57 ChildProcessSecurityPolicyImpl::GetInstance()->security_state_.size()); 56 ChildProcessSecurityPolicyImpl::GetInstance()->security_state_.size());
58 } 57 }
59 58
60 } // namespace content 59 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/ui/zoom/zoom_controller_browsertest.cc ('k') | content/browser/indexed_db/indexed_db_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698