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 "components/browser_watcher/window_hang_monitor_win.h" | 5 #include "components/browser_watcher/window_hang_monitor_win.h" |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/scoped_ptr.h" |
10 #include "base/path_service.h" | 11 #include "base/path_service.h" |
11 #include "base/process/launch.h" | 12 #include "base/process/launch.h" |
12 #include "base/process/process.h" | 13 #include "base/process/process.h" |
13 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
14 #include "base/synchronization/waitable_event.h" | 15 #include "base/synchronization/waitable_event.h" |
15 #include "base/test/multiprocess_test.h" | 16 #include "base/test/multiprocess_test.h" |
16 #include "base/threading/thread.h" | 17 #include "base/threading/thread.h" |
17 #include "base/win/message_window.h" | 18 #include "base/win/message_window.h" |
18 #include "base/win/scoped_handle.h" | 19 #include "base/win/scoped_handle.h" |
19 #include "base/win/win_util.h" | 20 #include "base/win/win_util.h" |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
458 | 459 |
459 ASSERT_TRUE(SendSignal(IPC_SIGNAL_HANG_MESSAGE_WINDOW)); | 460 ASSERT_TRUE(SendSignal(IPC_SIGNAL_HANG_MESSAGE_WINDOW)); |
460 | 461 |
461 EXPECT_EQ(WindowHangMonitor::WINDOW_HUNG, | 462 EXPECT_EQ(WindowHangMonitor::WINDOW_HUNG, |
462 monitor_thread().WaitForEvent()); | 463 monitor_thread().WaitForEvent()); |
463 | 464 |
464 ASSERT_TRUE(SendSignal(IPC_SIGNAL_TERMINATE_PROCESS)); | 465 ASSERT_TRUE(SendSignal(IPC_SIGNAL_TERMINATE_PROCESS)); |
465 } | 466 } |
466 | 467 |
467 } // namespace browser_watcher | 468 } // namespace browser_watcher |
OLD | NEW |