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

Unified Diff: test/mjsunit/es6/promises.js

Issue 203453002: Promises: make null a legal argument for .then (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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
« src/promise.js ('K') | « src/promise.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/promises.js
diff --git a/test/mjsunit/es6/promises.js b/test/mjsunit/es6/promises.js
index b5137931003ca397f0d116b95ef4e90921cebd7a..f1b191c2c6420c4f379e884ff1ff7813be160cc7 100644
--- a/test/mjsunit/es6/promises.js
+++ b/test/mjsunit/es6/promises.js
@@ -100,7 +100,12 @@ function assertAsyncDone(iteration) {
(function() {
Promise.resolve(5).then(undefined, assertUnreachable).chain(
- function(x) { assertAsync(x === 5, "resolved/then-nohandler") },
+ function(x) { assertAsync(x === 5, "resolved/then-nohandler-undefined") },
+ assertUnreachable
+ )
+ assertAsyncRan()
+ Promise.resolve(6).then(null, assertUnreachable).chain(
+ function(x) { assertAsync(x === 6, "resolved/then-nohandler-null") },
assertUnreachable
)
assertAsyncRan()
@@ -109,7 +114,12 @@ function assertAsyncDone(iteration) {
(function() {
Promise.reject(5).then(assertUnreachable, undefined).chain(
assertUnreachable,
- function(r) { assertAsync(r === 5, "rejected/then-nohandler") }
+ function(r) { assertAsync(r === 5, "rejected/then-nohandler-undefined") }
+ )
+ assertAsyncRan()
+ Promise.reject(6).then(assertUnreachable, null).chain(
+ assertUnreachable,
+ function(r) { assertAsync(r === 6, "rejected/then-nohandler-null") }
)
assertAsyncRan()
})();
« src/promise.js ('K') | « src/promise.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698