Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(297)

Side by Side Diff: chromeos/process_proxy/process_proxy_unittest.cc

Issue 1258193002: User MessageLoopForIO::WatchFileDescriptor in proces_output_watcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chromeos/process_proxy/process_proxy_registry.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « chromeos/process_proxy/process_proxy_registry.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698