OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
5 <script> | 5 <script> |
6 | 6 |
7 var tested = 0; | 7 var tested = 0; |
8 function runNextPromiseTest() | 8 function runNextPromiseTest() |
9 { | 9 { |
10 ++tested; | 10 ++tested; |
(...skipping 10 matching lines...) Expand all Loading... |
21 function promiseTest1() | 21 function promiseTest1() |
22 { | 22 { |
23 Promise.reject(new Error("err1")) | 23 Promise.reject(new Error("err1")) |
24 .then() | 24 .then() |
25 .then() | 25 .then() |
26 .then(); // Last is unhandled. | 26 .then(); // Last is unhandled. |
27 } | 27 } |
28 | 28 |
29 function promiseTest2() | 29 function promiseTest2() |
30 { | 30 { |
31 var reject | 31 var reject; |
32 var m0 = new Promise(function(res, rej) { reject = rej; }); | 32 var m0 = new Promise(function(res, rej) { reject = rej; }); |
33 var m1 = m0.then(function() {}); | 33 var m1 = m0.then(function() {}); |
34 var m2 = m0.then(function() {}); | 34 var m2 = m0.then(function() {}); |
35 var m3 = m0.then(function() {}); | 35 var m3 = m0.then(function() {}); |
36 var m4 = 0; | 36 var m4 = 0; |
37 m0.catch(function() { | 37 m0.catch(function() { |
38 m2.catch(function() { | 38 m2.catch(function() { |
39 m1.catch(function() { | 39 m1.catch(function() { |
40 m4 = m3.then(function() {}); // Unhandled. | 40 m4 = m3.then(function() {}); // Unhandled. |
41 }); | 41 }); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 </script> | 91 </script> |
92 </head> | 92 </head> |
93 | 93 |
94 <body onload="runTest()"> | 94 <body onload="runTest()"> |
95 <p> | 95 <p> |
96 Tests that uncaught promise rejections are logged into console. | 96 Tests that uncaught promise rejections are logged into console. |
97 </p> | 97 </p> |
98 | 98 |
99 </body> | 99 </body> |
100 </html> | 100 </html> |
OLD | NEW |