From 8772fe7363ee1765aeefccf88a8d973f11dd851e Mon Sep 17 00:00:00 2001 From: Bobby Holley Date: Wed, 1 Oct 2014 15:25:00 +0200 Subject: [PATCH] Bug 1065185 - Fix crash IPC tests. r=bz --- dom/ipc/tests/test_CrashService_crash.html | 6 +++--- dom/plugins/test/mochitest/utils.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dom/ipc/tests/test_CrashService_crash.html b/dom/ipc/tests/test_CrashService_crash.html index ce94119bc54d..eb9afcf04964 100644 --- a/dom/ipc/tests/test_CrashService_crash.html +++ b/dom/ipc/tests/test_CrashService_crash.html @@ -55,10 +55,10 @@ SpecialPowers.pushPrefEnv({'set':[ // Finally, poll for the new crash record. function tryGetCrash() { info("Waiting for getCrashes"); - crashMan.getCrashes().then(function (crashes) { + crashMan.getCrashes().then(SpecialPowers.wrapCallback(function (crashes) { if (crashes.length) { is(crashes.length, 1, "There should be only one record"); - var crash = SpecialPowers.wrap(crashes[0]); + var crash = crashes[0]; ok(crash.isOfType(crashMan.PROCESS_TYPE_CONTENT, crashMan.CRASH_TYPE_CRASH), "Record should be a content crash"); @@ -75,7 +75,7 @@ SpecialPowers.pushPrefEnv({'set':[ else { setTimeout(tryGetCrash, 1000); } - }, function (err) { + }), function (err) { ok(false, "Error getting crashes: " + err); SimpleTest.finish(); }); diff --git a/dom/plugins/test/mochitest/utils.js b/dom/plugins/test/mochitest/utils.js index 2d7299cb69af..a20ec57d0225 100644 --- a/dom/plugins/test/mochitest/utils.js +++ b/dom/plugins/test/mochitest/utils.js @@ -69,7 +69,7 @@ function crashAndGetCrashServiceRecord(crashMethodName, callback) { // the new record. function tryGetCrash() { info("Waiting for getCrashes"); - crashMan.getCrashes().then(function (crashes) { + crashMan.getCrashes().then(SpecialPowers.wrapCallback(function (crashes) { if (crashes.length) { is(crashes.length, 1, "There should be only one record"); var crash = SpecialPowers.wrap(crashes[0]); @@ -86,7 +86,7 @@ function crashAndGetCrashServiceRecord(crashMethodName, callback) { else { setTimeout(tryGetCrash, 1000); } - }, function (err) { + }), function (err) { ok(false, "Error getting crashes: " + err); SimpleTest.finish(); });