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

Unified Diff: LayoutTests/fast/js/Promise-catch.html

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
« no previous file with comments | « LayoutTests/fast/js/Promise-already-resolved.html ('k') | LayoutTests/fast/js/Promise-chain.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/js/Promise-catch.html
diff --git a/LayoutTests/fast/js/Promise-catch.html b/LayoutTests/fast/js/Promise-catch.html
index 9ac0d88a63b465e192c1d98d659f6188028c300d..998ffca560ad390725276425ff9fd857124b384e 100644
--- a/LayoutTests/fast/js/Promise-catch.html
+++ b/LayoutTests/fast/js/Promise-catch.html
@@ -10,11 +10,11 @@
description('Test Promise.');
window.jsTestIsAsync = true;
-var resolver;
+var reject;
-var firstPromise = new Promise(function(newResolver) {
+var firstPromise = new Promise(function(_, newReject) {
window.thisInInit = this;
- resolver = newResolver;
+ reject = newReject;
});
var secondPromise = firstPromise.catch(function(result) {
@@ -44,7 +44,7 @@ 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');
</script>
<script src="resources/js-test-post.js"></script>
</body>
« no previous file with comments | « LayoutTests/fast/js/Promise-already-resolved.html ('k') | LayoutTests/fast/js/Promise-chain.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698