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

Unified Diff: third_party/WebKit/Source/wtf/AssertionsTest.cpp

Issue 2288473002: Implement Dump-on-DCHECK (via a new LogSeverity). (Closed)
Patch Set: Break out sub-component CLs 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
« base/syslog_logging.cc ('K') | « third_party/WebKit/Source/wtf/Assertions.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/AssertionsTest.cpp
diff --git a/third_party/WebKit/Source/wtf/AssertionsTest.cpp b/third_party/WebKit/Source/wtf/AssertionsTest.cpp
index 76fc8013ab59d8856819d39ad99c94e794bb90c2..4fe800332cb37a18ebef19d348bf40e3b99bca40 100644
--- a/third_party/WebKit/Source/wtf/AssertionsTest.cpp
+++ b/third_party/WebKit/Source/wtf/AssertionsTest.cpp
@@ -12,9 +12,14 @@ namespace WTF {
TEST(AssertionsTest, Assertions) {
ASSERT(true);
-#if ENABLE(ASSERT)
+#if ENABLE(ASSERT) && !defined(DCHECK_IS_DUMP_WITHOUT_CRASH)
EXPECT_DEATH_IF_SUPPORTED(ASSERT(false), "");
EXPECT_DEATH_IF_SUPPORTED(ASSERT_NOT_REACHED(), "");
+ EXPECT_DEATH_IF_SUPPORTED(DCHECK_AT(false, __FILE__, __LINE__));
+#else
+ ASSERT(false);
+ ASSERT_NOT_REACHED();
+ DCHECK_AT(false, __FILE__, __LINE__);
#endif
RELEASE_ASSERT(true);
@@ -23,6 +28,8 @@ TEST(AssertionsTest, Assertions) {
SECURITY_DCHECK(true);
#if ENABLE(SECURITY_ASSERT)
EXPECT_DEATH_IF_SUPPORTED(SECURITY_DCHECK(false), "");
+#else
+ SECURITY_DCHECK(false);
#endif
SECURITY_CHECK(true);
« base/syslog_logging.cc ('K') | « third_party/WebKit/Source/wtf/Assertions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698