diff options
Diffstat (limited to 'js/src/tests/test262/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T2.js')
-rw-r--r-- | js/src/tests/test262/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T2.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/js/src/tests/test262/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T2.js b/js/src/tests/test262/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T2.js new file mode 100644 index 0000000000..3aeca23d95 --- /dev/null +++ b/js/src/tests/test262/built-ins/Promise/prototype/then/S25.4.5.3_A4.1_T2.js @@ -0,0 +1,22 @@ +// |reftest| async +// Copyright 2014 Cubane Canada, Inc. All rights reserved. +// See LICENSE for details. + +/*--- +info: | + PerformPromiseThen + Ref 25.4.5.3.1 +es6id: S25.4.5.3_A4.1_T2 +author: Sam Mikes +description: Promise.prototype.then accepts 'undefined' as arg1, arg2 +flags: [async] +---*/ + +var arg = {}; +var p = Promise.reject(arg); + +p.then(undefined, undefined).then(function() { + throw new Test262Error("Should not be called -- promise was rejected."); +}, function(result) { + assert.sameValue(result, arg, 'The value of result is expected to equal the value of arg'); +}).then($DONE, $DONE); |