summaryrefslogtreecommitdiffstats
path: root/toolkit/crashreporter/test/unit/test_crash_uncaught_exception.js
blob: 98158e601047d3dfdb7ba93d7a839f16b40680de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
  );
});