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

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

Issue 182613003: Promise.all and Promise.race reject non-array parameter. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 10 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 | « 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/harmony/promises.js
diff --git a/test/mjsunit/harmony/promises.js b/test/mjsunit/harmony/promises.js
index 38ccd7fb2bdc27a645efa5e25c1c03b0daaa2446..b5137931003ca397f0d116b95ef4e90921cebd7a 100644
--- a/test/mjsunit/harmony/promises.js
+++ b/test/mjsunit/harmony/promises.js
@@ -559,9 +559,9 @@ function assertAsyncDone(iteration) {
})();
(function() {
- Promise.all({get length() { throw 666 }}).chain(
+ Promise.all({}).chain(
assertUnreachable,
- function(r) { assertAsync(r === 666, "all/no-array") }
+ function(r) { assertAsync(r instanceof TypeError, "all/no-array") }
)
assertAsyncRan()
})();
@@ -658,9 +658,9 @@ function assertAsyncDone(iteration) {
})();
(function() {
- Promise.race({get length() { throw 666 }}).chain(
+ Promise.race({}).chain(
assertUnreachable,
- function(r) { assertAsync(r === 666, "one/no-array") }
+ function(r) { assertAsync(r instanceof TypeError, "one/no-array") }
)
assertAsyncRan()
})();
« no previous file with comments | « src/promise.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698