Chromium Code Reviews| Index: sandbox/win/src/process_mitigations_test.cc |
| diff --git a/sandbox/win/src/process_mitigations_test.cc b/sandbox/win/src/process_mitigations_test.cc |
| index b7c608eafb2380339d9f3e9325e29faaa0953f35..4e48017565bffd7cf33f1ec12098b97ec0321a60 100644 |
| --- a/sandbox/win/src/process_mitigations_test.cc |
| +++ b/sandbox/win/src/process_mitigations_test.cc |
| @@ -205,7 +205,7 @@ void TestWin10ImageLoadLowLabel(bool is_success_test) { |
| namespace sandbox { |
| // A shared helper test command that will attempt to CreateProcess |
| -// with a given command line. The second parameter, if set to non-zero |
| +// with a given command line. The second optional parameter, if set to non-zero |
|
penny
2016/04/01 17:20:30
<whisper>comma after 'non-zero'?</whisper>
:)
Will Harris
2016/04/01 18:23:52
actually it had a comma but it went over 80chars s
penny
2016/04/01 18:35:36
ROFL
|
| // will cause the child process to return exit code STATUS_ACCESS_VIOLATION. |
| // |
| // ***Make sure you've enabled basic process creation in the |
| @@ -214,12 +214,16 @@ namespace sandbox { |
| // sandbox::TargetPolicy::SetTokenLevel(), |
| // and TestRunner::SetDisableCsrss(). |
| SBOX_TESTS_COMMAND int TestChildProcess(int argc, wchar_t** argv) { |
| - if (argc < 2) |
| + if (argc < 1) |
| return SBOX_TEST_INVALID_PARAMETER; |
| - int desired_exit_code = _wtoi(argv[1]); |
| - if (desired_exit_code) |
| + int desired_exit_code = 0; |
| + |
| + if (argc == 2) { |
| + desired_exit_code = _wtoi(argv[1]); |
| + if (desired_exit_code) |
| desired_exit_code = STATUS_ACCESS_VIOLATION; |
| + } |
| std::wstring cmd = argv[0]; |
| base::LaunchOptions options = base::LaunchOptionsForTest(); |