| Index: base/synchronization/cancellation_flag_unittest.cc
|
| diff --git a/base/synchronization/cancellation_flag_unittest.cc b/base/synchronization/cancellation_flag_unittest.cc
|
| index 13c74bcbd45ffa7b12703e93ab4c5065ccbff88b..0dd63fe9ae32ab3aa9f47aa0464030079ed947c2 100644
|
| --- a/base/synchronization/cancellation_flag_unittest.cc
|
| +++ b/base/synchronization/cancellation_flag_unittest.cc
|
| @@ -8,9 +8,9 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/location.h"
|
| -#include "base/logging.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/synchronization/spin_wait.h"
|
| +#include "base/test/gtest_util.h"
|
| #include "base/threading/thread.h"
|
| #include "base/time/time.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -20,16 +20,6 @@ namespace base {
|
|
|
| namespace {
|
|
|
| -//------------------------------------------------------------------------------
|
| -// Define our test class.
|
| -//------------------------------------------------------------------------------
|
| -
|
| -void CancelHelper(CancellationFlag* flag) {
|
| -#if GTEST_HAS_DEATH_TEST
|
| - ASSERT_DEBUG_DEATH(flag->Set(), "");
|
| -#endif
|
| -}
|
| -
|
| TEST(CancellationFlagTest, SimpleSingleThreadedTest) {
|
| CancellationFlag flag;
|
| ASSERT_FALSE(flag.IsSet());
|
| @@ -46,6 +36,10 @@ TEST(CancellationFlagTest, DoubleSetTest) {
|
| ASSERT_TRUE(flag.IsSet());
|
| }
|
|
|
| +void CancelHelper(CancellationFlag* flag) {
|
| + EXPECT_DCHECK_DEATH(flag->Set(), "");
|
| +}
|
| +
|
| TEST(CancellationFlagTest, SetOnDifferentThreadDeathTest) {
|
| // Checks that Set() can't be called from any other thread.
|
| // CancellationFlag should die on a DCHECK if Set() is called from
|
|
|