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 #include "base/compiler_specific.h" | 5 #include "base/compiler_specific.h" |
6 #include "base/macros.h" | 6 #include "base/macros.h" |
7 #include "base/synchronization/waitable_event.h" | 7 #include "base/synchronization/waitable_event.h" |
8 #include "base/threading/platform_thread.h" | 8 #include "base/threading/platform_thread.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/googletest/include/gtest/gtest.h" |
10 | 10 |
11 #if defined(OS_POSIX) | 11 #if defined(OS_POSIX) |
12 #include <sys/types.h> | 12 #include <sys/types.h> |
13 #include <unistd.h> | 13 #include <unistd.h> |
14 #elif defined(OS_WIN) | 14 #elif defined(OS_WIN) |
15 #include <windows.h> | 15 #include <windows.h> |
16 #endif | 16 #endif |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 | 19 |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); | 263 ASSERT_TRUE(PlatformThread::Create(0, &thread, &handle)); |
264 thread.WaitForTerminationReady(); | 264 thread.WaitForTerminationReady(); |
265 ASSERT_TRUE(thread.IsRunning()); | 265 ASSERT_TRUE(thread.IsRunning()); |
266 | 266 |
267 thread.MarkForTermination(); | 267 thread.MarkForTermination(); |
268 PlatformThread::Join(handle); | 268 PlatformThread::Join(handle); |
269 ASSERT_FALSE(thread.IsRunning()); | 269 ASSERT_FALSE(thread.IsRunning()); |
270 } | 270 } |
271 | 271 |
272 } // namespace base | 272 } // namespace base |
OLD | NEW |