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

Side by Side Diff: base/process/process_util_unittest.cc

Issue 842703002: Revert of Move ForkWithFlags from sandbox/ to base/ and plug it into LaunchProcess. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 unified diff | Download patch
« no previous file with comments | « base/process/process_unittest.cc ('k') | content/zygote/zygote_linux.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #define _CRT_SECURE_NO_WARNINGS 5 #define _CRT_SECURE_NO_WARNINGS
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 677
678 env_changes[kBaseTest] = "wibble"; 678 env_changes[kBaseTest] = "wibble";
679 EXPECT_EQ("wibble\n", 679 EXPECT_EQ("wibble\n",
680 TestLaunchProcess( 680 TestLaunchProcess(
681 echo_base_test, env_changes, no_clear_environ, no_clone_flags)); 681 echo_base_test, env_changes, no_clear_environ, no_clone_flags));
682 682
683 #if defined(OS_LINUX) 683 #if defined(OS_LINUX)
684 // Test a non-trival value for clone_flags. 684 // Test a non-trival value for clone_flags.
685 // Don't test on Valgrind as it has limited support for clone(). 685 // Don't test on Valgrind as it has limited support for clone().
686 if (!RunningOnValgrind()) { 686 if (!RunningOnValgrind()) {
687 EXPECT_EQ("wibble\n", TestLaunchProcess(echo_base_test, env_changes, 687 EXPECT_EQ(
688 no_clear_environ, CLONE_FS)); 688 "wibble\n",
689 TestLaunchProcess(
690 echo_base_test, env_changes, no_clear_environ, CLONE_FS | SIGCHLD));
689 } 691 }
690 692
691 EXPECT_EQ( 693 EXPECT_EQ(
692 "BASE_TEST=wibble\n", 694 "BASE_TEST=wibble\n",
693 TestLaunchProcess( 695 TestLaunchProcess(
694 print_env, env_changes, true /* clear_environ */, no_clone_flags)); 696 print_env, env_changes, true /* clear_environ */, no_clone_flags));
695 env_changes.clear(); 697 env_changes.clear();
696 EXPECT_EQ( 698 EXPECT_EQ(
697 "", 699 "",
698 TestLaunchProcess( 700 TestLaunchProcess(
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 914
913 // Check that process was really killed. 915 // Check that process was really killed.
914 EXPECT_TRUE(IsProcessDead(child_process.Handle())); 916 EXPECT_TRUE(IsProcessDead(child_process.Handle()));
915 } 917 }
916 918
917 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) { 919 MULTIPROCESS_TEST_MAIN(process_util_test_die_immediately) {
918 return 0; 920 return 0;
919 } 921 }
920 922
921 #endif // defined(OS_POSIX) 923 #endif // defined(OS_POSIX)
OLDNEW
« no previous file with comments | « base/process/process_unittest.cc ('k') | content/zygote/zygote_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698