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 <gtest/gtest.h> | 5 #include <gtest/gtest.h> |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 registry_->CloseProcess(pid_); | 201 registry_->CloseProcess(pid_); |
202 | 202 |
203 base::TerminationStatus status = base::GetTerminationStatus(pid_, NULL); | 203 base::TerminationStatus status = base::GetTerminationStatus(pid_, NULL); |
204 EXPECT_NE(base::TERMINATION_STATUS_STILL_RUNNING, status); | 204 EXPECT_NE(base::TERMINATION_STATUS_STILL_RUNNING, status); |
205 if (status == base::TERMINATION_STATUS_STILL_RUNNING) { | 205 if (status == base::TERMINATION_STATUS_STILL_RUNNING) { |
206 base::Process process = | 206 base::Process process = |
207 base::Process::DeprecatedGetProcessFromHandle(pid_); | 207 base::Process::DeprecatedGetProcessFromHandle(pid_); |
208 process.Terminate(0, true); | 208 process.Terminate(0, true); |
209 } | 209 } |
210 | 210 |
| 211 registry_->ShutDown(); |
| 212 |
211 base::ThreadTaskRunnerHandle::Get()->PostTask( | 213 base::ThreadTaskRunnerHandle::Get()->PostTask( |
212 FROM_HERE, base::MessageLoop::QuitClosure()); | 214 FROM_HERE, base::MessageLoop::QuitClosure()); |
213 } | 215 } |
214 | 216 |
215 void RunTest() { | 217 void RunTest() { |
216 base::ThreadTaskRunnerHandle::Get()->PostTask( | 218 base::ThreadTaskRunnerHandle::Get()->PostTask( |
217 FROM_HERE, base::Bind(&ProcessProxyTest::InitRegistryTest, | 219 FROM_HERE, base::Bind(&ProcessProxyTest::InitRegistryTest, |
218 base::Unretained(this))); | 220 base::Unretained(this))); |
219 | 221 |
220 // Wait until all data from output watcher is received (QuitTask will be | 222 // Wait until all data from output watcher is received (QuitTask will be |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 } | 254 } |
253 | 255 |
254 // Test verifies that \003 message send to process is processed as SigInt. | 256 // Test verifies that \003 message send to process is processed as SigInt. |
255 // Timing out on the waterfall: http://crbug.com/115064 | 257 // Timing out on the waterfall: http://crbug.com/115064 |
256 TEST_F(ProcessProxyTest, DISABLED_SigInt) { | 258 TEST_F(ProcessProxyTest, DISABLED_SigInt) { |
257 test_runner_.reset(new SigIntTestRunner()); | 259 test_runner_.reset(new SigIntTestRunner()); |
258 RunTest(); | 260 RunTest(); |
259 } | 261 } |
260 | 262 |
261 } // namespace chromeos | 263 } // namespace chromeos |
OLD | NEW |