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

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

Issue 2288473002: Implement Dump-on-DCHECK (via a new LogSeverity). (Closed)
Patch Set: Fix test 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
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..c25a8296f6013d9ae88327baad15db75d0e25d86 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);

Powered by Google App Engine
This is Rietveld 408576698