summaryrefslogtreecommitdiffstats
path: root/toolkit/crashreporter/test/unit/test_crash_rust_panic_multiline.js
blob: d77574af40199aa713827ad8d42f43f57f5c1704 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
add_task(async function run_test() {
  // Try crashing with a Rust panic
  await do_crash(
    function() {
      Cc["@mozilla.org/xpcom/debug;1"]
        .getService(Ci.nsIDebug2)
        .rustPanic("OH NO\nOH NOES!");
    },
    function(mdump, extra) {
      Assert.equal(extra.MozCrashReason, "OH NO\nOH NOES!");
    },
    // process will exit with a zero exit status
    true
  );
});