| Index: sandbox/src/interception_unittest.cc
|
| diff --git a/sandbox/src/interception_unittest.cc b/sandbox/src/interception_unittest.cc
|
| index a0dd98d23cc9d7d255da229a976f14d025d2ee63..0dabb840b75d6f4a21e7e14f81d73f28e4c36862 100644
|
| --- a/sandbox/src/interception_unittest.cc
|
| +++ b/sandbox/src/interception_unittest.cc
|
| @@ -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.
|
|
|
| @@ -79,7 +79,13 @@ TEST(InterceptionManagerTest, BufferLayout1) {
|
| wchar_t exe_name[MAX_PATH];
|
| ASSERT_NE(0u, GetModuleFileName(NULL, exe_name, MAX_PATH - 1));
|
|
|
| - TargetProcess *target = MakeTestTargetProcess(::GetCurrentProcess(),
|
| + base::win::ScopedHandle current_process;
|
| + ASSERT_TRUE(
|
| + ::DuplicateHandle(::GetCurrentProcess(), ::GetCurrentProcess(),
|
| + ::GetCurrentProcess(), current_process.Receive(),
|
| + 0, FALSE, DUPLICATE_SAME_ACCESS));
|
| +
|
| + TargetProcess *target = MakeTestTargetProcess(current_process.Take(),
|
| ::GetModuleHandle(exe_name));
|
|
|
| InterceptionManager interceptions(target, true);
|
| @@ -166,7 +172,13 @@ TEST(InterceptionManagerTest, BufferLayout2) {
|
| wchar_t exe_name[MAX_PATH];
|
| ASSERT_NE(0u, GetModuleFileName(NULL, exe_name, MAX_PATH - 1));
|
|
|
| - TargetProcess *target = MakeTestTargetProcess(::GetCurrentProcess(),
|
| + base::win::ScopedHandle current_process;
|
| + ASSERT_TRUE(
|
| + ::DuplicateHandle(::GetCurrentProcess(), ::GetCurrentProcess(),
|
| + ::GetCurrentProcess(), current_process.Receive(),
|
| + 0, FALSE, DUPLICATE_SAME_ACCESS));
|
| +
|
| + TargetProcess *target = MakeTestTargetProcess(current_process.Take(),
|
| ::GetModuleHandle(exe_name));
|
|
|
| InterceptionManager interceptions(target, true);
|
|
|