From 0c8fb370d2cf551bf48056e87e54ac55a5b88645 Mon Sep 17 00:00:00 2001 From: Sebastian Hengst Date: Wed, 19 Apr 2017 16:29:47 +0200 Subject: [PATCH] Backed out changeset cc96b54811f6 (bug 1357625) for failing xpcshell's test_PromiseUtils.js. r=backout --- testing/modules/Assert.jsm | 4 +--- testing/modules/tests/xpcshell/test_assert.js | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/testing/modules/Assert.jsm b/testing/modules/Assert.jsm index 7ea979755575..47ea3a3e4fb1 100644 --- a/testing/modules/Assert.jsm +++ b/testing/modules/Assert.jsm @@ -375,8 +375,6 @@ proto.throws = function(block, expected, message) { * (mixed) Test reference to evaluate against the rejection result * @param message (optional) * (string) Short explanation of the expected result - * @return promise A promise that is resolved with the object the passed - * promise is rejected with. */ proto.rejects = function(promise, expected, message) { return new Promise((resolve, reject) => { @@ -392,7 +390,7 @@ proto.rejects = function(promise, expected, message) { return; } this.report(false, err, expected, message); - resolve(err); + resolve(); } ).then(null, reject); }); diff --git a/testing/modules/tests/xpcshell/test_assert.js b/testing/modules/tests/xpcshell/test_assert.js index c78ae542beee..df6c7a0b315b 100644 --- a/testing/modules/tests/xpcshell/test_assert.js +++ b/testing/modules/tests/xpcshell/test_assert.js @@ -351,10 +351,6 @@ add_task(function* test_rejects() { // A regex to match against the message. yield assert.rejects(Promise.reject(new Error("oh no")), /oh no/, "rejected"); - // Check the promise is resolved with the original rejection. - let result = yield assert.rejects(Promise.reject("oh no")); - equal(result, "oh no"); - // Failure cases: // An instance to check against that doesn't match. yield checkRejectsFails(new Error("something else"), SomeErrorLikeThing);