| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../inspector-test.js"></script> | 3 <script src="../../inspector-test.js"></script> |
| 4 <script src="../../debugger-test.js"></script> | 4 <script src="../../debugger-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function testFunction() | 7 function testFunction() |
| 8 { | 8 { |
| 9 setTimeout(doFetch, 0); | 9 setTimeout(doFetch, 0); |
| 10 } | 10 } |
| 11 | 11 |
| 12 function doFetch() | 12 function doFetch() |
| 13 { | 13 { |
| 14 fetch("../debugger/resources/script1.js").then(function chained1() { | 14 fetch("../debugger/resources/script1.js").then(function chained1() { |
| 15 debugger; |
| 15 }).then(function chained2() { | 16 }).then(function chained2() { |
| 16 }).then(function chained3() { | 17 }).then(function chained3() { |
| 17 throw Error("thrown from chained3"); | |
| 18 }).then(function chained4() { | 18 }).then(function chained4() { |
| 19 }).then(function chained5() { | |
| 20 }).then(function chained6() { | |
| 21 }).catch(function catchCallback() { | |
| 22 debugger; | 19 debugger; |
| 23 }); | 20 }); |
| 24 } | 21 } |
| 25 | 22 |
| 26 var test = function() | 23 var test = function() |
| 27 { | 24 { |
| 28 var totalDebuggerStatements = 1; | 25 var totalDebuggerStatements = 2; |
| 29 var maxAsyncCallStackDepth = 4; | 26 var maxAsyncCallStackDepth = 4; |
| 30 InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallSt
ackDepth); | 27 InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallSt
ackDepth); |
| 31 } | 28 } |
| 32 | 29 |
| 33 </script> | 30 </script> |
| 34 </head> | 31 </head> |
| 35 | 32 |
| 36 <body onload="runTest()"> | 33 <body onload="runTest()"> |
| 37 <p> | 34 <p> |
| 38 Tests asynchronous call stacks for fetch. | 35 Tests asynchronous call stacks for fetch. |
| 39 </p> | 36 </p> |
| 40 | 37 |
| 41 </body> | 38 </body> |
| 42 </html> | 39 </html> |
| OLD | NEW |