OLD | NEW |
1 importScripts('./js-test-pre.js'); | 1 importScripts('../../../resources/js-test.js'); |
2 | 2 |
3 description('Test Promise.'); | 3 description('Test Promise.'); |
4 | 4 |
5 var global = this; | 5 var global = this; |
6 | 6 |
7 global.jsTestIsAsync = true; | 7 global.jsTestIsAsync = true; |
8 | 8 |
9 var resolve; | 9 var resolve; |
10 | 10 |
11 var firstPromise = new Promise(function(newResolve) { | 11 var firstPromise = new Promise(function(newResolve) { |
(...skipping 16 matching lines...) Expand all Loading... |
28 shouldBeTrue('firstPromise instanceof Promise'); | 28 shouldBeTrue('firstPromise instanceof Promise'); |
29 shouldBeTrue('secondPromise instanceof Promise'); | 29 shouldBeTrue('secondPromise instanceof Promise'); |
30 | 30 |
31 shouldThrow('firstPromise.then(null)', '"TypeError: onFulfilled must be a functi
on or undefined"'); | 31 shouldThrow('firstPromise.then(null)', '"TypeError: onFulfilled must be a functi
on or undefined"'); |
32 shouldThrow('firstPromise.then(undefined, null)', '"TypeError: onRejected must b
e a function or undefined"'); | 32 shouldThrow('firstPromise.then(undefined, null)', '"TypeError: onRejected must b
e a function or undefined"'); |
33 shouldThrow('firstPromise.then(37)', '"TypeError: onFulfilled must be a function
or undefined"'); | 33 shouldThrow('firstPromise.then(37)', '"TypeError: onFulfilled must be a function
or undefined"'); |
34 | 34 |
35 resolve('hello'); | 35 resolve('hello'); |
36 | 36 |
37 | 37 |
OLD | NEW |