Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Unified Diff: LayoutTests/fast/js/resources/Promise-catch-in-workers.js

Issue 23567043: Promise init callback takes resolve and reject functions (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/js/resources/Promise-catch-in-workers.js
diff --git a/LayoutTests/fast/js/resources/Promise-catch-in-workers.js b/LayoutTests/fast/js/resources/Promise-catch-in-workers.js
index 0668ce539212a9d1bd5adab3a8e4658f67ed993c..9031d71776dc9d92100eeebf9e915bcb2304269f 100644
--- a/LayoutTests/fast/js/resources/Promise-catch-in-workers.js
+++ b/LayoutTests/fast/js/resources/Promise-catch-in-workers.js
@@ -5,11 +5,11 @@ description('Test Promise.');
var global = this;
global.jsTestIsAsync = true;
-var resolver;
+var reject;
-var firstPromise = new Promise(function(newResolver) {
+var firstPromise = new Promise(function(newResolve, newReject) {
global.thisInInit = this;
- resolver = newResolver;
+ reject = newReject;
});
var secondPromise = firstPromise.catch(function(result) {
@@ -39,5 +39,5 @@ shouldBeTrue('secondPromise instanceof Promise');
shouldThrow('firstPromise.catch(null)', '"TypeError: rejectCallback must be a function or undefined"');
shouldThrow('firstPromise.catch(37)', '"TypeError: rejectCallback must be a function or undefined"');
-resolver.reject('hello');
+reject('hello');
« no previous file with comments | « LayoutTests/fast/js/Promise-then-without-callbacks.html ('k') | LayoutTests/fast/js/resources/Promise-fulfill-in-workers.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698