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

Unified Diff: LayoutTests/fast/js/Promise-already-resolved.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-rejected.html ('k') | LayoutTests/fast/js/Promise-catch.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/js/Promise-already-resolved.html
diff --git a/LayoutTests/fast/js/Promise-already-resolved.html b/LayoutTests/fast/js/Promise-already-resolved.html
index 6a97cf1da71bd9ff184b31660c0692f6cd67de7f..df25c9d980408ae0f3ccc030415af9d0a02d627e 100644
--- a/LayoutTests/fast/js/Promise-already-resolved.html
+++ b/LayoutTests/fast/js/Promise-already-resolved.html
@@ -11,14 +11,13 @@ description('Test Promise.');
window.jsTestIsAsync = true;
-new Promise(function(resolver) {
- var anotherResolver;
- resolver.resolve(new Promise(function(r) { anotherResolver = r; }));
- resolver.fulfill('fulfill');
- resolver.resolve('resolve');
- resolver.reject('reject');
+new Promise(function(resolve, reject) {
+ var anotherResolve;
+ resolve(new Promise(function(r) { anotherResolve = r; }));
+ resolve('resolve');
+ reject('reject');
- anotherResolver.fulfill('foo');
+ anotherResolve('foo');
}).then(function(result) {
window.result = result;
shouldBeEqualToString('result', 'foo');
« no previous file with comments | « LayoutTests/fast/js/Promise-already-rejected.html ('k') | LayoutTests/fast/js/Promise-catch.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698