| 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/debugger-test.js"></script> | 4 <script src="../../http/tests/inspector/debugger-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function testFunction() | 7 function testFunction() |
| 8 { | 8 { |
| 9 function innerTestFunction() | 9 function innerTestFunction() |
| 10 { | 10 { |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 function imageClickHandlerSync() | 74 function imageClickHandlerSync() |
| 75 { | 75 { |
| 76 debugger; // synchronous call => should have same async call chain as for ti
meout3() | 76 debugger; // synchronous call => should have same async call chain as for ti
meout3() |
| 77 } | 77 } |
| 78 | 78 |
| 79 var test = function() | 79 var test = function() |
| 80 { | 80 { |
| 81 var totalDebuggerStatements = 10; | 81 var totalDebuggerStatements = 10; |
| 82 var maxAsyncCallStackDepth = 4; | 82 var maxAsyncCallStackDepth = 4; |
| 83 | 83 InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallSt
ackDepth); |
| 84 InspectorTest.setQuiet(true); | |
| 85 InspectorTest.startDebuggerTest(step1); | |
| 86 | |
| 87 function step1() | |
| 88 { | |
| 89 DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, step2); | |
| 90 } | |
| 91 | |
| 92 function step2() | |
| 93 { | |
| 94 InspectorTest.runTestFunctionAndWaitUntilPaused(didPaused); | |
| 95 } | |
| 96 | |
| 97 var step = 0; | |
| 98 var callStacksOutput = []; | |
| 99 function didPaused(callFrames, reason, breakpointIds, asyncStackTrace) | |
| 100 { | |
| 101 ++step; | |
| 102 InspectorTest.beginResultBufferring(); | |
| 103 InspectorTest.captureStackTrace(callFrames, asyncStackTrace); | |
| 104 callStacksOutput.push(InspectorTest.endResultBufferring()); | |
| 105 | |
| 106 if (step < totalDebuggerStatements) { | |
| 107 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(Ins
pectorTest, didPaused)); | |
| 108 } else { | |
| 109 InspectorTest.addResult("Captured call stacks in no particular order
:"); | |
| 110 callStacksOutput.sort(); | |
| 111 InspectorTest.addResults(callStacksOutput); | |
| 112 InspectorTest.completeDebuggerTest(); | |
| 113 } | |
| 114 } | |
| 115 } | 84 } |
| 116 | 85 |
| 117 </script> | 86 </script> |
| 118 </head> | 87 </head> |
| 119 | 88 |
| 120 <body onload="runTest()"> | 89 <body onload="runTest()"> |
| 121 <p> | 90 <p> |
| 122 Tests asynchronous call stacks in debugger. | 91 Tests asynchronous call stacks in debugger. |
| 123 </p> | 92 </p> |
| 124 <img id="image" onerror="imageErrorHandler()"></img> | 93 <img id="image" onerror="imageErrorHandler()"></img> |
| 125 | 94 |
| 126 </body> | 95 </body> |
| 127 </html> | 96 </html> |
| OLD | NEW |