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

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

Issue 1826223004: Correctly handle child processes of sandboxed target processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unused test 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/process_mitigations_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/process_policy_test.cc
diff --git a/sandbox/win/src/process_policy_test.cc b/sandbox/win/src/process_policy_test.cc
index 8062d4611ed179cc500b0d63ff1bebcf3475ebda..28d5ac26e136a9c6128f280a34412cce42364e52 100644
--- a/sandbox/win/src/process_policy_test.cc
+++ b/sandbox/win/src/process_policy_test.cc
@@ -270,6 +270,10 @@ SBOX_TESTS_COMMAND int Process_OpenToken(int argc, wchar_t **argv) {
return SBOX_TEST_FAILED;
}
+SBOX_TESTS_COMMAND int Process_Crash(int argc, wchar_t **argv) {
+ __debugbreak();
+ return SBOX_TEST_FAILED;
+}
// Generate a event name, used to test thread creation.
std::wstring GenerateEventName(DWORD pid) {
wchar_t buff[30] = {0};
@@ -409,6 +413,12 @@ TEST(ProcessPolicyTest, CreateProcessAW) {
runner.RunTest(L"Process_RunApp6 findstr.exe"));
}
+// Tests that the broker correctly handles a process crashing within the job.
+TEST(ProcessPolicyTest, CreateProcessCrashy) {
+ TestRunner runner;
+ EXPECT_EQ(STATUS_BREAKPOINT, runner.RunTest(L"Process_Crash"));
+}
+
TEST(ProcessPolicyTest, OpenToken) {
TestRunner runner;
EXPECT_EQ(SBOX_TEST_SUCCEEDED, runner.RunTest(L"Process_OpenToken"));
« no previous file with comments | « sandbox/win/src/process_mitigations_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698