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

Unified Diff: sandbox/win/src/sandbox_nt_util_unittest.cc

Issue 1851213002: Remove sandbox on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix nacl compile issues Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/win/src/sandbox_nt_util.cc ('k') | sandbox/win/src/sandbox_policy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/sandbox_nt_util_unittest.cc
diff --git a/sandbox/win/src/sandbox_nt_util_unittest.cc b/sandbox/win/src/sandbox_nt_util_unittest.cc
deleted file mode 100644
index 0fbea6680247323a351574b8f9dfdb31f00c7685..0000000000000000000000000000000000000000
--- a/sandbox/win/src/sandbox_nt_util_unittest.cc
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright 2015 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.
-
-#include <windows.h>
-
-#include "base/win/scoped_handle.h"
-#include "base/win/scoped_process_information.h"
-#include "sandbox/win/src/policy_broker.h"
-#include "sandbox/win/src/sandbox_nt_util.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace sandbox {
-namespace {
-
-TEST(SandboxNtUtil, IsSameProcessPseudoHandle) {
- InitGlobalNt();
-
- HANDLE current_process_pseudo = GetCurrentProcess();
- EXPECT_TRUE(IsSameProcess(current_process_pseudo));
-}
-
-TEST(SandboxNtUtil, IsSameProcessNonPseudoHandle) {
- InitGlobalNt();
-
- base::win::ScopedHandle current_process(
- OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, GetCurrentProcessId()));
- ASSERT_TRUE(current_process.IsValid());
- EXPECT_TRUE(IsSameProcess(current_process.Get()));
-}
-
-TEST(SandboxNtUtil, IsSameProcessDifferentProcess) {
- InitGlobalNt();
-
- STARTUPINFO si = {sizeof(si)};
- PROCESS_INFORMATION pi = {};
- wchar_t notepad[] = L"notepad";
- ASSERT_TRUE(CreateProcessW(nullptr, notepad, nullptr, nullptr, FALSE, 0,
- nullptr, nullptr, &si, &pi));
- base::win::ScopedProcessInformation process_info(pi);
-
- EXPECT_FALSE(IsSameProcess(process_info.process_handle()));
- EXPECT_TRUE(TerminateProcess(process_info.process_handle(), 0));
-}
-
-} // namespace
-} // namespace sandbox
« no previous file with comments | « sandbox/win/src/sandbox_nt_util.cc ('k') | sandbox/win/src/sandbox_policy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698