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 <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/base_switches.h" | 10 #include "base/base_switches.h" |
11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/message_loop/message_loop.h" |
12 #include "base/path_service.h" | 13 #include "base/path_service.h" |
13 #include "base/process/launch.h" | 14 #include "base/process/launch.h" |
14 #include "base/process/process.h" | 15 #include "base/process/process.h" |
15 #include "base/strings/string_number_conversions.h" | 16 #include "base/strings/string_number_conversions.h" |
16 #include "base/synchronization/waitable_event.h" | 17 #include "base/synchronization/waitable_event.h" |
17 #include "base/test/multiprocess_test.h" | 18 #include "base/test/multiprocess_test.h" |
18 #include "base/threading/thread.h" | 19 #include "base/threading/thread.h" |
19 #include "base/win/message_window.h" | 20 #include "base/win/message_window.h" |
20 #include "base/win/scoped_handle.h" | 21 #include "base/win/scoped_handle.h" |
21 #include "base/win/win_util.h" | 22 #include "base/win/win_util.h" |
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 | 469 |
469 ASSERT_TRUE(SendSignal(IPC_SIGNAL_HANG_MESSAGE_WINDOW)); | 470 ASSERT_TRUE(SendSignal(IPC_SIGNAL_HANG_MESSAGE_WINDOW)); |
470 | 471 |
471 EXPECT_EQ(WindowHangMonitor::WINDOW_HUNG, | 472 EXPECT_EQ(WindowHangMonitor::WINDOW_HUNG, |
472 monitor_thread().WaitForEvent()); | 473 monitor_thread().WaitForEvent()); |
473 | 474 |
474 ASSERT_TRUE(SendSignal(IPC_SIGNAL_TERMINATE_PROCESS)); | 475 ASSERT_TRUE(SendSignal(IPC_SIGNAL_TERMINATE_PROCESS)); |
475 } | 476 } |
476 | 477 |
477 } // namespace browser_watcher | 478 } // namespace browser_watcher |
OLD | NEW |