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

Side by Side Diff: chrome/browser/renderer_host/render_process_host_chrome_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
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/process/process.h" 6 #include "base/process/process.h"
7 #include "chrome/browser/chrome_notification_types.h" 7 #include "chrome/browser/chrome_notification_types.h"
8 #include "chrome/browser/devtools/devtools_window.h" 8 #include "chrome/browser/devtools/devtools_window.h"
9 #include "chrome/browser/search/search.h" 9 #include "chrome/browser/search/search.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 // Use NOTIFICATION_BROWSER_CLOSED instead of NOTIFICATION_WINDOW_CLOSED, 503 // Use NOTIFICATION_BROWSER_CLOSED instead of NOTIFICATION_WINDOW_CLOSED,
504 // since the latter is not implemented on OSX and the test will timeout, 504 // since the latter is not implemented on OSX and the test will timeout,
505 // causing it to fail. 505 // causing it to fail.
506 content::WindowedNotificationObserver observer( 506 content::WindowedNotificationObserver observer(
507 chrome::NOTIFICATION_BROWSER_CLOSED, 507 chrome::NOTIFICATION_BROWSER_CLOSED,
508 content::NotificationService::AllSources()); 508 content::NotificationService::AllSources());
509 509
510 // Kill the renderer process, simulating a crash. This should the ProcessDied 510 // Kill the renderer process, simulating a crash. This should the ProcessDied
511 // method to be called. Alternatively, RenderProcessHost::OnChannelError can 511 // method to be called. Alternatively, RenderProcessHost::OnChannelError can
512 // be called to directly force a call to ProcessDied. 512 // be called to directly force a call to ProcessDied.
513 base::KillProcess(wc1->GetRenderProcessHost()->GetHandle(), -1, true); 513 wc1->GetRenderProcessHost()->Shutdown(-1, true);
514 514
515 observer.Wait(); 515 observer.Wait();
516 } 516 }
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | chrome/browser/ui/browser_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698