summaryrefslogtreecommitdiffstats
path: root/testing/gtest/mozilla/MozHelpers.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--testing/gtest/mozilla/MozHelpers.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/gtest/mozilla/MozHelpers.cpp b/testing/gtest/mozilla/MozHelpers.cpp
new file mode 100644
index 0000000000..468c6f0ab5
--- /dev/null
+++ b/testing/gtest/mozilla/MozHelpers.cpp
@@ -0,0 +1,13 @@
+#include "MozHelpers.h"
+
+namespace mozilla::gtest {
+
+void DisableCrashReporter() {
+ nsCOMPtr<nsICrashReporter> crashreporter =
+ do_GetService("@mozilla.org/toolkit/crash-reporter;1");
+ if (crashreporter) {
+ crashreporter->SetEnabled(false);
+ }
+}
+
+} // namespace mozilla::gtest