blob: f93efababa57d4a7f057979c2ff7e1e120efa212 [file] [log] [blame]
Test Promise.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS promise instanceof Promise is true
PASS promise.constructor is Promise
PASS thisInInit === promise is false
PASS thisInInit === window is true
PASS resolve instanceof Function is true
PASS reject instanceof Function is true
PASS new Promise() threw exception TypeError: Promise constructor takes a function argument.
PASS new Promise(37) threw exception TypeError: Promise constructor takes a function argument.
PASS promise = new Promise(function() { throw Error("foo"); }) did not throw exception.
PASS result.message is "foo"
PASS fulfilled
PASS result is "hello"
PASS successfullyParsed is true
TEST COMPLETE