blob: e4b503df0761c8cb4e8f0597e2e7f6f6e698ff52 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// 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.2_T2
author: Sam Mikes
description: Promise.prototype.then treats non-callable arg1, arg2 as undefined
flags: [async]
---*/
var obj = {};
var p = Promise.reject(obj);
p.then(3, 5).then(function () {
$ERROR("Should not be called -- promise was rejected.");
}, function (arg) {
if (arg !== obj) {
$ERROR("Expected resolution object to be passed through, got " + arg);
}
}).then($DONE, $DONE);
|