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

Side by Side Diff: components/browser_watcher/exit_code_watcher_win_unittest.cc

Issue 811603003: Add a console control handler chrome_watcher.dll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_process
Patch Set: Address Greg's nits. Created 6 years 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
OLDNEW
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2014 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/exit_code_watcher_win.h" 5 #include "components/browser_watcher/exit_code_watcher_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/process/process.h" 8 #include "base/process/process.h"
9 #include "base/strings/string16.h" 9 #include "base/strings/string16.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 EXPECT_TRUE(watcher.ParseArguments(cmd_line_)); 213 EXPECT_TRUE(watcher.ParseArguments(cmd_line_));
214 ASSERT_EQ(sleeper_handle, watcher.process().Handle()); 214 ASSERT_EQ(sleeper_handle, watcher.process().Handle());
215 215
216 // Verify that the watcher wrote a sentinel for the process. 216 // Verify that the watcher wrote a sentinel for the process.
217 VerifyWroteExitCode(sleeper.process().pid(), STILL_ACTIVE); 217 VerifyWroteExitCode(sleeper.process().pid(), STILL_ACTIVE);
218 218
219 // Kill the sleeper, and make sure it's exited before we continue. 219 // Kill the sleeper, and make sure it's exited before we continue.
220 ASSERT_NO_FATAL_FAILURE(sleeper.Kill(kExitCode, true)); 220 ASSERT_NO_FATAL_FAILURE(sleeper.Kill(kExitCode, true));
221 221
222 watcher.WaitForExit(); 222 watcher.WaitForExit();
223 EXPECT_EQ(kExitCode, watcher.exit_code());
223 224
224 VerifyWroteExitCode(sleeper.process().pid(), kExitCode); 225 VerifyWroteExitCode(sleeper.process().pid(), kExitCode);
225 } 226 }
226 227
227 } // namespace browser_watcher 228 } // namespace browser_watcher
OLDNEW
« no previous file with comments | « components/browser_watcher/exit_code_watcher_win.cc ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698