diff options
Diffstat (limited to 'sandbox/src/job_unittest.cc')
-rw-r--r-- | sandbox/src/job_unittest.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sandbox/src/job_unittest.cc b/sandbox/src/job_unittest.cc index f386f1f..0f7010d 100644 --- a/sandbox/src/job_unittest.cc +++ b/sandbox/src/job_unittest.cc @@ -1,10 +1,9 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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. // This file contains unit tests for the job object. -#include "base/win/scoped_process_information.h" #include "sandbox/src/job.h" #include "testing/gtest/include/gtest/gtest.h" @@ -160,11 +159,11 @@ TEST(JobTest, ProcessInJob) { wchar_t notepad[] = L"notepad"; STARTUPINFO si = { sizeof(si) }; - base::win::ScopedProcessInformation pi; + PROCESS_INFORMATION pi = {0}; result = ::CreateProcess(NULL, notepad, NULL, NULL, FALSE, 0, NULL, NULL, &si, - pi.Receive()); + &pi); ASSERT_TRUE(result); - ASSERT_EQ(ERROR_SUCCESS, job.AssignProcessToJob(pi.process_handle())); + ASSERT_EQ(ERROR_SUCCESS, job.AssignProcessToJob(pi.hProcess)); // Get the job handle. HANDLE job_handle = job.Detach(); @@ -179,9 +178,9 @@ TEST(JobTest, ProcessInJob) { EXPECT_EQ(1, jbpidl.NumberOfAssignedProcesses); EXPECT_EQ(1, jbpidl.NumberOfProcessIdsInList); - EXPECT_EQ(pi.process_id(), jbpidl.ProcessIdList[0]); + EXPECT_EQ(pi.dwProcessId, jbpidl.ProcessIdList[0]); - EXPECT_TRUE(::TerminateProcess(pi.process_handle(), 0)); + EXPECT_TRUE(::TerminateProcess(pi.hProcess, 0)); EXPECT_TRUE(::CloseHandle(job_handle)); } |