Index: base/metrics/field_trial_unittest.cc |
diff --git a/base/metrics/field_trial_unittest.cc b/base/metrics/field_trial_unittest.cc |
index 00f351fa2c8b0142c58f6eaa0e0399349dbba36c..fd3d4ac90c0a65ad08f7337030ec85f95ca0ef4d 100644 |
--- a/base/metrics/field_trial_unittest.cc |
+++ b/base/metrics/field_trial_unittest.cc |
@@ -13,6 +13,7 @@ |
#include "base/run_loop.h" |
#include "base/strings/string_number_conversions.h" |
#include "base/strings/stringprintf.h" |
+#include "base/test/gtest_util.h" |
#include "testing/gtest/include/gtest/gtest.h" |
namespace base { |
@@ -1120,15 +1121,15 @@ TEST(FieldTrialTestWithoutList, StatesStringFormat) { |
EXPECT_TRUE(field_trial_list.TrialExists("zzz")); |
} |
-#if GTEST_HAS_DEATH_TEST |
TEST(FieldTrialDeathTest, OneTimeRandomizedTrialWithoutFieldTrialList) { |
// Trying to instantiate a one-time randomized field trial before the |
// FieldTrialList is created should crash. |
- EXPECT_DEATH(FieldTrialList::FactoryGetFieldTrial( |
- "OneTimeRandomizedTrialWithoutFieldTrialList", 100, kDefaultGroupName, |
- base::FieldTrialList::kNoExpirationYear, 1, 1, |
- base::FieldTrial::ONE_TIME_RANDOMIZED, NULL), ""); |
+ EXPECT_DCHECK_DEATH( |
+ FieldTrialList::FactoryGetFieldTrial( |
+ "OneTimeRandomizedTrialWithoutFieldTrialList", 100, kDefaultGroupName, |
+ base::FieldTrialList::kNoExpirationYear, 1, 1, |
+ base::FieldTrial::ONE_TIME_RANDOMIZED, NULL), |
+ ""); |
} |
-#endif |
} // namespace base |