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

Unified Diff: LayoutTests/fast/js/resources/Promise-then-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-then-in-workers.js
diff --git a/LayoutTests/fast/js/resources/Promise-then-in-workers.js b/LayoutTests/fast/js/resources/Promise-then-in-workers.js
index 485136acc469bb7336475c475294113538b0fd87..eee8f9c14aab9f5a4d4c7828f50594b16d630729 100644
--- a/LayoutTests/fast/js/resources/Promise-then-in-workers.js
+++ b/LayoutTests/fast/js/resources/Promise-then-in-workers.js
@@ -6,11 +6,11 @@ var global = this;
global.jsTestIsAsync = true;
-var resolver;
+var resolve;
-var firstPromise = new Promise(function(newResolver) {
+var firstPromise = new Promise(function(newResolve) {
global.thisInInit = this;
- resolver = newResolver;
+ resolve = newResolve;
});
var secondPromise = firstPromise.then(function(result) {
@@ -30,6 +30,6 @@ shouldThrow('firstPromise.then(null)', '"TypeError: fulfillCallback must be a fu
shouldThrow('firstPromise.then(undefined, null)', '"TypeError: rejectCallback must be a function or undefined"');
shouldThrow('firstPromise.then(37)', '"TypeError: fulfillCallback must be a function or undefined"');
-resolver.fulfill('hello');
+resolve('hello');

Powered by Google App Engine
This is Rietveld 408576698