Index: base/message_loop/message_pump_io_ios_unittest.cc |
diff --git a/base/message_loop/message_pump_io_ios_unittest.cc b/base/message_loop/message_pump_io_ios_unittest.cc |
index 9aadc6bbfc2624ff380c950017114c47fb016581..cde10958bfbe52303d10ce8fea08ae285adebba0 100644 |
--- a/base/message_loop/message_pump_io_ios_unittest.cc |
+++ b/base/message_loop/message_pump_io_ios_unittest.cc |
@@ -9,6 +9,7 @@ |
#include "base/macros.h" |
#include "base/message_loop/message_loop.h" |
#include "base/posix/eintr_wrapper.h" |
+#include "base/test/gtest_util.h" |
#include "base/threading/thread.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -72,22 +73,20 @@ class StupidWatcher : public MessagePumpIOSForIO::Watcher { |
void OnFileCanWriteWithoutBlocking(int fd) override {} |
}; |
-#if GTEST_HAS_DEATH_TEST && !defined(NDEBUG) |
- |
-// Test to make sure that we catch calling WatchFileDescriptor off of the |
-// wrong thread. |
+// Test to make sure that we catch calling WatchFileDescriptor off of the wrong |
+// thread. |
TEST_F(MessagePumpIOSForIOTest, TestWatchingFromBadThread) { |
MessagePumpIOSForIO::FileDescriptorWatcher watcher; |
StupidWatcher delegate; |
- ASSERT_DEBUG_DEATH(io_loop()->WatchFileDescriptor( |
- STDOUT_FILENO, false, MessageLoopForIO::WATCH_READ, &watcher, &delegate), |
+ ASSERT_DCHECK_DEATH( |
+ io_loop()->WatchFileDescriptor(STDOUT_FILENO, false, |
+ MessageLoopForIO::WATCH_READ, &watcher, |
+ &delegate), |
"Check failed: " |
"watch_file_descriptor_caller_checker_.CalledOnValidThread\\(\\)"); |
} |
-#endif // GTEST_HAS_DEATH_TEST && !defined(NDEBUG) |
- |
class BaseWatcher : public MessagePumpIOSForIO::Watcher { |
public: |
BaseWatcher(MessagePumpIOSForIO::FileDescriptorWatcher* controller) |