OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/task_scheduler/scheduler_lock.h" | 5 #include "base/task_scheduler/scheduler_lock.h" |
6 | 6 |
7 #include <stdlib.h> | 7 #include <stdlib.h> |
8 | 8 |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/rand_util.h" | 11 #include "base/rand_util.h" |
12 #include "base/synchronization/waitable_event.h" | 12 #include "base/synchronization/waitable_event.h" |
13 #include "base/task_scheduler/test_utils.h" | 13 #include "base/test/gtest_util.h" |
14 #include "base/threading/platform_thread.h" | 14 #include "base/threading/platform_thread.h" |
15 #include "base/threading/simple_thread.h" | 15 #include "base/threading/simple_thread.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 namespace internal { | 19 namespace internal { |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Adapted from base::Lock's BasicLockTestThread to make sure | 22 // Adapted from base::Lock's BasicLockTestThread to make sure |
23 // Acquire()/Release() don't crash. | 23 // Acquire()/Release() don't crash. |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 SchedulerLock lock4; | 287 SchedulerLock lock4; |
288 SchedulerLock lock5; | 288 SchedulerLock lock5; |
289 }; | 289 }; |
290 | 290 |
291 EXPECT_DCHECK_DEATH({ LockCycle cycle; }, ""); | 291 EXPECT_DCHECK_DEATH({ LockCycle cycle; }, ""); |
292 } | 292 } |
293 | 293 |
294 } // namespace | 294 } // namespace |
295 } // namespace internal | 295 } // namespace internal |
296 } // namespace base | 296 } // namespace base |
OLD | NEW |