Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Unified Diff: chrome/browser/prefs/incognito_mode_prefs_unittest.cc

Issue 2630963002: Migrate tests to use EXPECT_DCHECK_DEATH instead of EXPECT_DEATH. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/task/cancelable_task_tracker_unittest.cc ('k') | chrome/test/chromedriver/net/timeout_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/prefs/incognito_mode_prefs_unittest.cc
diff --git a/chrome/browser/prefs/incognito_mode_prefs_unittest.cc b/chrome/browser/prefs/incognito_mode_prefs_unittest.cc
index 9b2492a0df82a65f4e4c5f310502bcdcb1894157..7637c6fdb2031e5d2604ac04475902e3f4475f6c 100644
--- a/chrome/browser/prefs/incognito_mode_prefs_unittest.cc
+++ b/chrome/browser/prefs/incognito_mode_prefs_unittest.cc
@@ -4,6 +4,7 @@
#include "chrome/browser/prefs/incognito_mode_prefs.h"
+#include "base/test/gtest_util.h"
#include "chrome/common/pref_names.h"
#include "components/sync_preferences/testing_pref_service_syncable.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -55,22 +56,12 @@ TEST_F(IncognitoModePrefsTest, GetAvailability) {
typedef IncognitoModePrefsTest IncognitoModePrefsDeathTest;
-#if GTEST_HAS_DEATH_TEST
TEST_F(IncognitoModePrefsDeathTest, GetAvailabilityBadValue) {
prefs_.SetUserPref(prefs::kIncognitoModeAvailability,
new base::FundamentalValue(-1));
-#if defined(NDEBUG) && defined(DCHECK_ALWAYS_ON)
- EXPECT_DEATH({
+ EXPECT_DCHECK_DEATH({
IncognitoModePrefs::Availability availability =
IncognitoModePrefs::GetAvailability(&prefs_);
EXPECT_EQ(IncognitoModePrefs::ENABLED, availability);
- }, "");
-#else
- EXPECT_DEBUG_DEATH({
- IncognitoModePrefs::Availability availability =
- IncognitoModePrefs::GetAvailability(&prefs_);
- EXPECT_EQ(IncognitoModePrefs::ENABLED, availability);
- }, "");
-#endif
+ });
}
-#endif // GTEST_HAS_DEATH_TEST
« no previous file with comments | « base/task/cancelable_task_tracker_unittest.cc ('k') | chrome/test/chromedriver/net/timeout_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698