| 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 src="../../../http/tests/inspector/debugger-test.js"></script> | 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> |
| 6 <script> | 6 <script> |
| 7 | 7 |
| 8 var a = "FAIL"; | 8 var a = "FAIL"; |
| 9 var g = "PASS"; |
| 9 function testFunction() | 10 function testFunction() |
| 10 { | 11 { |
| 11 var a = "PASS"; | 12 var a = "PASS"; |
| 12 function inner() | 13 function inner() |
| 13 { | 14 { |
| 14 var b = a || "FAIL"; | 15 var b = a || "FAIL"; |
| 15 setTimeout(timeout, 0); | 16 setTimeout(timeout, 0); |
| 16 } | 17 } |
| 17 inner(); | 18 inner(); |
| 18 | 19 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 39 | 40 |
| 40 function step2() | 41 function step2() |
| 41 { | 42 { |
| 42 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause); | 43 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause); |
| 43 } | 44 } |
| 44 | 45 |
| 45 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) | 46 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) |
| 46 { | 47 { |
| 47 InspectorTest.captureStackTrace(callFrames, asyncStackTrace); | 48 InspectorTest.captureStackTrace(callFrames, asyncStackTrace); |
| 48 | 49 |
| 50 selectCallFrameAndRun(1, step3); |
| 51 } |
| 52 |
| 53 function selectCallFrameAndRun(frameNumber, callback) |
| 54 { |
| 49 var pane = WebInspector.panels.sources.sidebarPanes.callstack; | 55 var pane = WebInspector.panels.sources.sidebarPanes.callstack; |
| 50 var frame = pane.callFrames[1]; | 56 var frame = pane.callFrames[frameNumber]; |
| 51 InspectorTest.addResult("Select call frame: " + frame.title()); | 57 InspectorTest.addResult("Select call frame: " + frame.title()); |
| 52 pane._callFrameSelected(frame); | 58 pane._callFrameSelected(frame); |
| 53 InspectorTest.runAfterPendingDispatches(step3); | 59 InspectorTest.runAfterPendingDispatches(callback); |
| 54 } | 60 } |
| 55 | 61 |
| 56 function step3() | 62 function step3() |
| 57 { | 63 { |
| 58 InspectorTest.evaluateInConsoleAndDump("a", step4); | 64 InspectorTest.evaluateInConsoleAndDump("a", step4); |
| 59 } | 65 } |
| 60 | 66 |
| 61 function step4() | 67 function step4() |
| 62 { | 68 { |
| 63 InspectorTest.evaluateInConsoleAndDump("b", tearDown); | 69 InspectorTest.evaluateInConsoleAndDump("b", step5); |
| 70 } |
| 71 |
| 72 function step5() |
| 73 { |
| 74 selectCallFrameAndRun(3, step6); |
| 75 } |
| 76 |
| 77 function step6() |
| 78 { |
| 79 InspectorTest.evaluateInConsoleAndDump("g", tearDown); |
| 64 } | 80 } |
| 65 | 81 |
| 66 function tearDown() | 82 function tearDown() |
| 67 { | 83 { |
| 68 InspectorTest.completeDebuggerTest(); | 84 InspectorTest.completeDebuggerTest(); |
| 69 } | 85 } |
| 70 } | 86 } |
| 71 | 87 |
| 72 </script> | 88 </script> |
| 73 </head> | 89 </head> |
| 74 | 90 |
| 75 <body onload="runTest()"> | 91 <body onload="runTest()"> |
| 76 <p> | 92 <p> |
| 77 Tests evaluation in an async call frame. | 93 Tests evaluation in an async call frame. |
| 78 </p> | 94 </p> |
| 79 | 95 |
| 80 </body> | 96 </body> |
| 81 </html> | 97 </html> |
| OLD | NEW |