michael@0: function run_test() michael@0: { michael@0: if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) { michael@0: dump("INFO | test_crash_purevirtual.js | Can't test crashreporter in a non-libxul build.\n"); michael@0: return; michael@0: } michael@0: michael@0: var isOSX = ("nsILocalFileMac" in Components.interfaces); michael@0: if (isOSX) { michael@0: dump("INFO | test_crash_purevirtual.js | TODO: purecalls not caught on OS X\n"); michael@0: return; michael@0: } michael@0: michael@0: // Try crashing with a pure virtual call michael@0: do_crash(function() { michael@0: crashType = CrashTestUtils.CRASH_PURE_VIRTUAL_CALL; michael@0: crashReporter.annotateCrashReport("TestKey", "TestValue"); michael@0: }, michael@0: function(mdump, extra) { michael@0: do_check_eq(extra.TestKey, "TestValue"); michael@0: }, michael@0: // process will exit with a zero exit status michael@0: true); michael@0: }