Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test gets skipped with pattern: os == 'android' OR os == 'win' && msix
- Manifest: toolkit/crashreporter/test/unit/xpcshell.toml
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
);
});