summaryrefslogtreecommitdiffstats
path: root/toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported.js
diff options
context:
space:
mode:
Diffstat (limited to 'toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported.js')
-rw-r--r--toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported.js34
1 files changed, 0 insertions, 34 deletions
diff --git a/toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported.js b/toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported.js
deleted file mode 100644
index 4bed8e2fd..000000000
--- a/toolkit/crashreporter/test/unit/test_crash_after_js_oom_reported.js
+++ /dev/null
@@ -1,34 +0,0 @@
-function run_test()
-{
- if (!("@mozilla.org/toolkit/crash-reporter;1" in Components.classes)) {
- dump("INFO | test_crash_after_js_oom_reported.js | Can't test crashreporter in a non-libxul build.\n");
- return;
- }
-
- do_crash(
- function() {
- crashType = CrashTestUtils.CRASH_MOZ_CRASH;
- crashReporter.annotateCrashReport("TestingOOMCrash", "Yes");
-
- // GC now to avoid having it happen randomly later, which would make the
- // test bogusly fail. See comment below.
- Components.utils.forceGC();
-
- Components.utils.getJSTestingFunctions().reportOutOfMemory();
- },
- function(mdump, extra) {
- do_check_eq(extra.TestingOOMCrash, "Yes");
-
- // The JSOutOfMemory field is absent if the JS engine never reported OOM,
- // "Reported" if it did, and "Recovered" if it reported OOM but
- // subsequently completed a full GC cycle. Since this test calls
- // reportOutOfMemory() and then crashes, we expect "Reported".
- //
- // Theoretically, GC can happen any time, so it is just possible that
- // this property could be "Recovered" even if the implementation is
- // correct. More likely, though, that indicates a bug, so only accept
- // "Reported".
- do_check_eq(extra.JSOutOfMemory, "Reported");
- },
- true);
-}