Chromium Code Reviews| Index: base/process_util_unittest.cc |
| =================================================================== |
| --- base/process_util_unittest.cc (revision 118588) |
| +++ base/process_util_unittest.cc (working copy) |
| @@ -1,4 +1,4 @@ |
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| @@ -172,6 +172,18 @@ |
| remove(kSignalFileSlow); |
| } |
| +#if defined(OS_WIN) |
|
Evan Martin
2012/01/24 16:30:15
Add a TODO: this should work on other platforms or
|
| +TEST_F(ProcessUtilTest, GetProcId) { |
| + base::ProcessId id1 = base::GetProcId(GetCurrentProcess()); |
| + EXPECT_NE(0ul, id1); |
| + base::ProcessHandle handle = this->SpawnChild("SimpleChildProcess", false); |
| + ASSERT_NE(base::kNullProcessHandle, handle); |
| + base::ProcessId id2 = base::GetProcId(handle); |
| + EXPECT_NE(0ul, id2); |
|
Evan Martin
2012/01/24 16:30:15
Maybe check id1 != id2?
|
| + base::CloseProcessHandle(handle); |
| +} |
| +#endif |
| + |
| #if !defined(OS_MACOSX) |
| // This test is disabled on Mac, since it's flaky due to ReportCrash |
| // taking a variable amount of time to parse and load the debug and |