Index: base/metrics/persistent_sample_map_unittest.cc |
diff --git a/base/metrics/persistent_sample_map_unittest.cc b/base/metrics/persistent_sample_map_unittest.cc |
index beb72e5f20f93d629a2fc55e083165eb55b4a379..91bd0a9d9074883e41c928b72ba796bd0a2b4ce5 100644 |
--- a/base/metrics/persistent_sample_map_unittest.cc |
+++ b/base/metrics/persistent_sample_map_unittest.cc |
@@ -8,6 +8,7 @@ |
#include "base/memory/ptr_util.h" |
#include "base/metrics/persistent_histogram_allocator.h" |
+#include "base/test/gtest_util.h" |
#include "testing/gtest/include/gtest/gtest.h" |
namespace base { |
@@ -233,8 +234,6 @@ TEST(PersistentSampleMapIteratorTest, SkipEmptyRanges) { |
EXPECT_TRUE(it->Done()); |
} |
-// Only run this test on builds that support catching a DCHECK crash. |
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST |
TEST(PersistentSampleMapIteratorDeathTest, IterateDoneTest) { |
std::unique_ptr<PersistentHistogramAllocator> allocator = |
CreateHistogramAllocator(64 << 10); // 64 KiB |
@@ -248,16 +247,14 @@ TEST(PersistentSampleMapIteratorDeathTest, IterateDoneTest) { |
HistogramBase::Sample min; |
HistogramBase::Sample max; |
HistogramBase::Count count; |
- EXPECT_DEATH(it->Get(&min, &max, &count), ""); |
+ EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count), ""); |
- EXPECT_DEATH(it->Next(), ""); |
+ EXPECT_DCHECK_DEATH(it->Next(), ""); |
samples.Accumulate(1, 100); |
it = samples.Iterator(); |
EXPECT_FALSE(it->Done()); |
} |
-#endif |
-// (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST |
} // namespace |
} // namespace base |