Index: test/mjsunit/es6/promises.js |
diff --git a/test/mjsunit/es6/promises.js b/test/mjsunit/es6/promises.js |
index ba5a306f84a23ecee98f11ddb1b1991afd394f1e..6dfe9261a858a3d658df84475feccce63d5a8aaa 100644 |
--- a/test/mjsunit/es6/promises.js |
+++ b/test/mjsunit/es6/promises.js |
@@ -25,7 +25,7 @@ |
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
-// Flags: --harmony-promises --allow-natives-syntax |
+// Flags: --allow-natives-syntax |
var asyncAssertsExpected = 0; |
@@ -399,6 +399,30 @@ function assertAsyncDone(iteration) { |
(function() { |
var deferred = Promise.defer() |
var p1 = deferred.promise |
+ var p2 = p1.then(1, 2) |
+ p2.then( |
+ function(x) { assertAsync(x === 5, "then/resolve-non-function") }, |
+ assertUnreachable |
+ ) |
+ deferred.resolve(5) |
+ assertAsyncRan() |
+})(); |
+ |
+(function() { |
+ var deferred = Promise.defer() |
+ var p1 = deferred.promise |
+ var p2 = p1.then(1, 2) |
+ p2.then( |
+ assertUnreachable, |
+ function(x) { assertAsync(x === 5, "then/reject-non-function") } |
+ ) |
+ deferred.reject(5) |
+ assertAsyncRan() |
+})(); |
+ |
+(function() { |
+ var deferred = Promise.defer() |
+ var p1 = deferred.promise |
var p2 = {then: function(onResolve, onReject) { onResolve(p1) }} |
var p3 = Promise.accept(p2) |
p3.chain( |