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

Unified Diff: net/test/scoped_disable_exit_on_dfatal.h

Issue 2638763004: Report CHECK/DCHECK to test launcher summary output. (Closed)
Patch Set: Add comment. Fix missed usage of SetLogAssertHandler. 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: net/test/scoped_disable_exit_on_dfatal.h
diff --git a/net/test/scoped_disable_exit_on_dfatal.h b/net/test/scoped_disable_exit_on_dfatal.h
index 33f06e3bc59ce534f786ba33ef58284938d6be83..50a8a169ad1fcfdcef9866051bdba6f791fec2ca 100644
--- a/net/test/scoped_disable_exit_on_dfatal.h
+++ b/net/test/scoped_disable_exit_on_dfatal.h
@@ -7,6 +7,7 @@
#include "base/logging.h"
#include "base/macros.h"
+#include "base/test/logging_utils.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -17,18 +18,19 @@ namespace test {
// program when we encounter a LOG(DFATAL) within the current block.
// After we leave the current block, the default behavior is
// restored.
-class ScopedDisableExitOnDFatal {
+class ScopedDisableExitOnDFatal : public logging::ScopedLogAssertHandler {
Paweł Hajdan Jr. 2017/01/27 17:19:44 Should we use composition instead of inheritance?
alex-ac 2017/02/11 20:12:20 Done.
public:
ScopedDisableExitOnDFatal();
~ScopedDisableExitOnDFatal();
private:
- // Currently active instance.
- static ScopedDisableExitOnDFatal* g_instance_;
-
// Static function which is set as the logging assert handler.
// Called when there is a check failure.
- static void LogAssertHandler(const std::string& msg);
+ static void LogAssertHandler(const char* file,
+ int line,
+ size_t message_start,
+ size_t stack_start,
+ const std::string& msg);
DISALLOW_COPY_AND_ASSIGN(ScopedDisableExitOnDFatal);
};

Powered by Google App Engine
This is Rietveld 408576698