OLD | NEW |
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/eintr_wrapper.h" | 10 #include "base/eintr_wrapper.h" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 base::ProcessHandle handle = this->SpawnChild("SlowChildProcess", false); | 139 base::ProcessHandle handle = this->SpawnChild("SlowChildProcess", false); |
140 ASSERT_NE(base::kNullProcessHandle, handle); | 140 ASSERT_NE(base::kNullProcessHandle, handle); |
141 SignalChildren(kSignalFileSlow); | 141 SignalChildren(kSignalFileSlow); |
142 EXPECT_TRUE(base::WaitForSingleProcess( | 142 EXPECT_TRUE(base::WaitForSingleProcess( |
143 handle, TestTimeouts::action_max_timeout_ms())); | 143 handle, TestTimeouts::action_max_timeout_ms())); |
144 base::CloseProcessHandle(handle); | 144 base::CloseProcessHandle(handle); |
145 remove(kSignalFileSlow); | 145 remove(kSignalFileSlow); |
146 } | 146 } |
147 | 147 |
148 // Times out on Linux and Win, flakes on other platforms, http://crbug.com/95058 | 148 // Times out on Linux and Win, flakes on other platforms, http://crbug.com/95058 |
149 #if defined(OS_LINUX) || defined(OS_WIN) | 149 TEST_F(ProcessUtilTest, DISABLED_GetTerminationStatusExit) { |
150 #define MAYBE_GetTerminationStatusExit DISABLED_GetTerminationStatusExit | |
151 #else | |
152 #define MAYBE_GetTerminationStatusExit FLAKY_GetTerminationStatusExit | |
153 #endif | |
154 | |
155 TEST_F(ProcessUtilTest, MAYBE_GetTerminationStatusExit) { | |
156 remove(kSignalFileSlow); | 150 remove(kSignalFileSlow); |
157 base::ProcessHandle handle = this->SpawnChild("SlowChildProcess", false); | 151 base::ProcessHandle handle = this->SpawnChild("SlowChildProcess", false); |
158 ASSERT_NE(base::kNullProcessHandle, handle); | 152 ASSERT_NE(base::kNullProcessHandle, handle); |
159 | 153 |
160 int exit_code = 42; | 154 int exit_code = 42; |
161 EXPECT_EQ(base::TERMINATION_STATUS_STILL_RUNNING, | 155 EXPECT_EQ(base::TERMINATION_STATUS_STILL_RUNNING, |
162 base::GetTerminationStatus(handle, &exit_code)); | 156 base::GetTerminationStatus(handle, &exit_code)); |
163 EXPECT_EQ(kExpectedStillRunningExitCode, exit_code); | 157 EXPECT_EQ(kExpectedStillRunningExitCode, exit_code); |
164 | 158 |
165 SignalChildren(kSignalFileSlow); | 159 SignalChildren(kSignalFileSlow); |
(...skipping 990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 SetUpInDeathAssert(); | 1150 SetUpInDeathAssert(); |
1157 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} | 1151 while ((value_ = base::AllocatePsychoticallyBigObjCObject())) {} |
1158 }, ""); | 1152 }, ""); |
1159 } | 1153 } |
1160 | 1154 |
1161 #endif // !ARCH_CPU_64_BITS | 1155 #endif // !ARCH_CPU_64_BITS |
1162 #endif // OS_MACOSX | 1156 #endif // OS_MACOSX |
1163 | 1157 |
1164 #endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && | 1158 #endif // !defined(OS_ANDROID) && !defined(OS_OPENBSD) && |
1165 // !defined(OS_WIN) && !defined(ADDRESS_SANITIZER) | 1159 // !defined(OS_WIN) && !defined(ADDRESS_SANITIZER) |
OLD | NEW |