1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/toolkit/crashreporter/test/unit/test_crash_purevirtual.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,24 @@ 1.4 +function run_test() 1.5 +{ 1.6 + if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) { 1.7 + dump("INFO | test_crash_purevirtual.js | Can't test crashreporter in a non-libxul build.\n"); 1.8 + return; 1.9 + } 1.10 + 1.11 + var isOSX = ("nsILocalFileMac" in Components.interfaces); 1.12 + if (isOSX) { 1.13 + dump("INFO | test_crash_purevirtual.js | TODO: purecalls not caught on OS X\n"); 1.14 + return; 1.15 + } 1.16 + 1.17 + // Try crashing with a pure virtual call 1.18 + do_crash(function() { 1.19 + crashType = CrashTestUtils.CRASH_PURE_VIRTUAL_CALL; 1.20 + crashReporter.annotateCrashReport("TestKey", "TestValue"); 1.21 + }, 1.22 + function(mdump, extra) { 1.23 + do_check_eq(extra.TestKey, "TestValue"); 1.24 + }, 1.25 + // process will exit with a zero exit status 1.26 + true); 1.27 +}