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

Unified Diff: base/logging_unittest.cc

Issue 1814423002: Patch to try dump-on-DCHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Disable Blink ASSERT in dump-without-DCHECK builds Created 4 years, 9 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: base/logging_unittest.cc
diff --git a/base/logging_unittest.cc b/base/logging_unittest.cc
index 22fb855b62afea792fb1708b5948f79d8a1f2848..e8756f1fb82a056380a1992ea20899bcb32605fe 100644
--- a/base/logging_unittest.cc
+++ b/base/logging_unittest.cc
@@ -234,13 +234,19 @@ TEST_F(LoggingTest, Dcheck) {
EXPECT_TRUE(DLOG_IS_ON(DCHECK));
#endif
+#if defined(DCHECK_IS_DUMP_WITHOUT_CRASH)
+ const bool kDCheckLogsOutput = false;
+#else
+ const bool kDCheckLogsOutput = DCHECK_IS_ON();
+#endif
+
EXPECT_EQ(0, log_sink_call_count);
DCHECK(false);
- EXPECT_EQ(DCHECK_IS_ON() ? 1 : 0, log_sink_call_count);
+ EXPECT_EQ(kDCheckLogsOutput ? 1 : 0, log_sink_call_count);
DPCHECK(false);
- EXPECT_EQ(DCHECK_IS_ON() ? 2 : 0, log_sink_call_count);
+ EXPECT_EQ(kDCheckLogsOutput ? 2 : 0, log_sink_call_count);
DCHECK_EQ(0, 1);
- EXPECT_EQ(DCHECK_IS_ON() ? 3 : 0, log_sink_call_count);
+ EXPECT_EQ(kDCheckLogsOutput ? 3 : 0, log_sink_call_count);
}
TEST_F(LoggingTest, DcheckReleaseBehavior) {
« no previous file with comments | « base/logging.cc ('k') | build/common.gypi » ('j') | third_party/WebKit/Source/wtf/Assertions.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698