| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "chrome/browser/process_singleton.h" | 5 #include "chrome/browser/process_singleton.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/files/file_path.h" | 12 #include "base/files/file_path.h" |
| 13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" |
| 15 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/process/launch.h" | 17 #include "base/process/launch.h" |
| 17 #include "base/process/process.h" | 18 #include "base/process/process.h" |
| 18 #include "base/process/process_handle.h" | 19 #include "base/process/process_handle.h" |
| 19 #include "base/strings/string16.h" | 20 #include "base/strings/string16.h" |
| 20 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
| 21 #include "base/test/multiprocess_test.h" | 22 #include "base/test/multiprocess_test.h" |
| 22 #include "base/win/scoped_handle.h" | 23 #include "base/win/scoped_handle.h" |
| 23 #include "base/win/wrapped_window_proc.h" | 24 #include "base/win/wrapped_window_proc.h" |
| 24 #include "chrome/browser/chrome_process_finder_win.h" | 25 #include "chrome/browser/chrome_process_finder_win.h" |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 // visible window. | 309 // visible window. |
| 309 EXPECT_TRUE(should_kill_called()); | 310 EXPECT_TRUE(should_kill_called()); |
| 310 | 311 |
| 311 // Verify that the hung browser has beem terminated with the | 312 // Verify that the hung browser has beem terminated with the |
| 312 // RESULT_CODE_HUNG exit code. | 313 // RESULT_CODE_HUNG exit code. |
| 313 int exit_code = 0; | 314 int exit_code = 0; |
| 314 EXPECT_TRUE( | 315 EXPECT_TRUE( |
| 315 browser_victim()->WaitForExitWithTimeout(base::TimeDelta(), &exit_code)); | 316 browser_victim()->WaitForExitWithTimeout(base::TimeDelta(), &exit_code)); |
| 316 EXPECT_EQ(content::RESULT_CODE_HUNG, exit_code); | 317 EXPECT_EQ(content::RESULT_CODE_HUNG, exit_code); |
| 317 } | 318 } |
| OLD | NEW |