| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |