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 <windows.h> | 5 #include <windows.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/process_util.h" | 10 #include "base/process/kill.h" |
11 #include "base/test/multiprocess_test.h" | 11 #include "base/test/multiprocess_test.h" |
12 #include "base/win/scoped_process_information.h" | 12 #include "base/win/scoped_process_information.h" |
13 #include "testing/multiprocess_func_list.h" | 13 #include "testing/multiprocess_func_list.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 const DWORD kProcessId = 4321; | 17 const DWORD kProcessId = 4321; |
18 const DWORD kThreadId = 1234; | 18 const DWORD kThreadId = 1234; |
19 const HANDLE kProcessHandle = reinterpret_cast<HANDLE>(7651); | 19 const HANDLE kProcessHandle = reinterpret_cast<HANDLE>(7651); |
20 const HANDLE kThreadHandle = reinterpret_cast<HANDLE>(1567); | 20 const HANDLE kThreadHandle = reinterpret_cast<HANDLE>(1567); |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 base::win::ScopedProcessInformation process_info; | 152 base::win::ScopedProcessInformation process_info; |
153 process_info.Set(base_process_info); | 153 process_info.Set(base_process_info); |
154 | 154 |
155 EXPECT_EQ(kProcessId, process_info.process_id()); | 155 EXPECT_EQ(kProcessId, process_info.process_id()); |
156 EXPECT_EQ(kThreadId, process_info.thread_id()); | 156 EXPECT_EQ(kThreadId, process_info.thread_id()); |
157 EXPECT_EQ(kProcessHandle, process_info.process_handle()); | 157 EXPECT_EQ(kProcessHandle, process_info.process_handle()); |
158 EXPECT_EQ(kThreadHandle, process_info.thread_handle()); | 158 EXPECT_EQ(kThreadHandle, process_info.thread_handle()); |
159 base_process_info = process_info.Take(); | 159 base_process_info = process_info.Take(); |
160 } | 160 } |
OLD | NEW |