summaryrefslogtreecommitdiffstats
path: root/toolkit/crashreporter/test/unit/test_crash_uncaught_exception.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/crashreporter/test/unit/test_crash_uncaught_exception.js')
-rw-r--r--toolkit/crashreporter/test/unit/test_crash_uncaught_exception.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/toolkit/crashreporter/test/unit/test_crash_uncaught_exception.js b/toolkit/crashreporter/test/unit/test_crash_uncaught_exception.js
new file mode 100644
index 0000000000..bfcd2b0ef2
--- /dev/null
+++ b/toolkit/crashreporter/test/unit/test_crash_uncaught_exception.js
@@ -0,0 +1,17 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+add_task(async function run_test() {
+ // Try crashing with an uncaught exception.
+ await do_crash(
+ function () {
+ crashType = CrashTestUtils.CRASH_UNCAUGHT_EXCEPTION;
+ crashReporter.annotateCrashReport("TestKey", "TestValue");
+ },
+ function (mdump, extra) {
+ Assert.equal(extra.TestKey, "TestValue");
+ },
+ // process will exit with a zero exit status
+ true
+ );
+});