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 function runPromises(source) | 7 function runPromises(source) |
8 { | 8 { |
9 Promise.reject(new Error(source + ".err1")) | 9 Promise.reject(new Error(source + ".err1")) |
10 .then() | 10 .then() |
(...skipping 12 matching lines...) Expand all Loading... |
23 m4 = m3.then(function() {}); // Unhandled. | 23 m4 = m3.then(function() {}); // Unhandled. |
24 }); | 24 }); |
25 }); | 25 }); |
26 }); | 26 }); |
27 reject(new Error(source + ".err2")); | 27 reject(new Error(source + ".err2")); |
28 } | 28 } |
29 | 29 |
30 function onload() | 30 function onload() |
31 { | 31 { |
32 runPromises("onload"); | 32 runPromises("onload"); |
33 runTest(); | 33 |
| 34 if (window.testRunner) { |
| 35 testRunner.dumpAsText(); |
| 36 testRunner.waitUntilDone(); |
| 37 } |
| 38 |
| 39 // Run tests after all microtasks. |
| 40 setTimeout(runTest, 0); |
34 } | 41 } |
35 | 42 |
36 function runPromisesFromInspector() | 43 function runPromisesFromInspector() |
37 { | 44 { |
38 // setTimeout to cut off VM call frames from the stack trace. | 45 // setTimeout to cut off VM call frames from the stack trace. |
39 setTimeout(function timeout() { | 46 setTimeout(function timeout() { |
40 runPromises("inspector") | 47 runPromises("inspector") |
41 }, 0); | 48 }, 0); |
42 } | 49 } |
43 | 50 |
(...skipping 23 matching lines...) Expand all Loading... |
67 </script> | 74 </script> |
68 </head> | 75 </head> |
69 | 76 |
70 <body onload="onload()"> | 77 <body onload="onload()"> |
71 <p> | 78 <p> |
72 Tests that uncaught promise rejections are logged into console. | 79 Tests that uncaught promise rejections are logged into console. |
73 </p> | 80 </p> |
74 | 81 |
75 </body> | 82 </body> |
76 </html> | 83 </html> |
OLD | NEW |