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

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

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests Created 5 years 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/message_loop/message_loop_unittest.cc ('k') | base/profiler/native_stack_sampler_win.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 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 base::GetTerminationStatus(process.Handle(), &exit_code)); 271 base::GetTerminationStatus(process.Handle(), &exit_code));
272 EXPECT_EQ(kExpectedStillRunningExitCode, exit_code); 272 EXPECT_EQ(kExpectedStillRunningExitCode, exit_code);
273 273
274 SignalChildren(signal_file.c_str()); 274 SignalChildren(signal_file.c_str());
275 exit_code = 42; 275 exit_code = 42;
276 base::TerminationStatus status = 276 base::TerminationStatus status =
277 WaitForChildTermination(process.Handle(), &exit_code); 277 WaitForChildTermination(process.Handle(), &exit_code);
278 EXPECT_EQ(base::TERMINATION_STATUS_PROCESS_CRASHED, status); 278 EXPECT_EQ(base::TERMINATION_STATUS_PROCESS_CRASHED, status);
279 279
280 #if defined(OS_WIN) 280 #if defined(OS_WIN)
281 EXPECT_EQ(0xc0000005, exit_code); 281 EXPECT_EQ(static_cast<int>(0xc0000005), exit_code);
282 #elif defined(OS_POSIX) 282 #elif defined(OS_POSIX)
283 int signaled = WIFSIGNALED(exit_code); 283 int signaled = WIFSIGNALED(exit_code);
284 EXPECT_NE(0, signaled); 284 EXPECT_NE(0, signaled);
285 int signal = WTERMSIG(exit_code); 285 int signal = WTERMSIG(exit_code);
286 EXPECT_EQ(SIGSEGV, signal); 286 EXPECT_EQ(SIGSEGV, signal);
287 #endif 287 #endif
288 288
289 // Reset signal handlers back to "normal". 289 // Reset signal handlers back to "normal".
290 base::debug::EnableInProcessStackDumping(); 290 base::debug::EnableInProcessStackDumping();
291 remove(signal_file.c_str()); 291 remove(signal_file.c_str());
(...skipping 828 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 options.current_directory = base::FilePath("/dev/null"); 1120 options.current_directory = base::FilePath("/dev/null");
1121 1121
1122 base::Process process(SpawnChildWithOptions("SimpleChildProcess", options)); 1122 base::Process process(SpawnChildWithOptions("SimpleChildProcess", options));
1123 ASSERT_TRUE(process.IsValid()); 1123 ASSERT_TRUE(process.IsValid());
1124 1124
1125 int exit_code = kSuccess; 1125 int exit_code = kSuccess;
1126 EXPECT_TRUE(process.WaitForExit(&exit_code)); 1126 EXPECT_TRUE(process.WaitForExit(&exit_code));
1127 EXPECT_NE(kSuccess, exit_code); 1127 EXPECT_NE(kSuccess, exit_code);
1128 } 1128 }
1129 #endif 1129 #endif
OLDNEW
« no previous file with comments | « base/message_loop/message_loop_unittest.cc ('k') | base/profiler/native_stack_sampler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698