| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script src="../../../http/tests/inspector/console-test.js"></script> | |
| 5 <script src="../../../http/tests/inspector/debugger-test.js"></script> | |
| 6 <script> | |
| 7 | |
| 8 var a = "FAIL"; | |
| 9 function testFunction() | |
| 10 { | |
| 11 var a = "PASS"; | |
| 12 function inner() | |
| 13 { | |
| 14 var b = a || "FAIL"; | |
| 15 setTimeout(timeout, 0); | |
| 16 } | |
| 17 inner(); | |
| 18 | |
| 19 a = b = "FAIL: re-assigned"; | |
| 20 } | |
| 21 | |
| 22 function timeout() | |
| 23 { | |
| 24 var b = "FAIL"; | |
| 25 debugger; | |
| 26 } | |
| 27 | |
| 28 var test = function() | |
| 29 { | |
| 30 var maxAsyncCallStackDepth = 4; | |
| 31 | |
| 32 InspectorTest.setQuiet(true); | |
| 33 InspectorTest.startDebuggerTest(step1); | |
| 34 | |
| 35 function step1() | |
| 36 { | |
| 37 InspectorTest.DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDept
h, step2); | |
| 38 } | |
| 39 | |
| 40 function step2() | |
| 41 { | |
| 42 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause); | |
| 43 } | |
| 44 | |
| 45 function didPause(callFrames, reason, breakpointIds, asyncStackTrace) | |
| 46 { | |
| 47 InspectorTest.captureStackTrace(callFrames, asyncStackTrace); | |
| 48 | |
| 49 var pane = WebInspector.panels.sources.sidebarPanes.callstack; | |
| 50 var frame = pane.callFrames[1]; | |
| 51 InspectorTest.addResult("Select call frame: " + frame.title()); | |
| 52 pane._callFrameSelected(frame); | |
| 53 InspectorTest.runAfterPendingDispatches(step3); | |
| 54 } | |
| 55 | |
| 56 function step3() | |
| 57 { | |
| 58 InspectorTest.evaluateInConsoleAndDump("a", step4); | |
| 59 } | |
| 60 | |
| 61 function step4() | |
| 62 { | |
| 63 InspectorTest.evaluateInConsoleAndDump("b", tearDown); | |
| 64 } | |
| 65 | |
| 66 function tearDown() | |
| 67 { | |
| 68 InspectorTest.completeDebuggerTest(); | |
| 69 } | |
| 70 } | |
| 71 | |
| 72 </script> | |
| 73 </head> | |
| 74 | |
| 75 <body onload="runTest()"> | |
| 76 <p> | |
| 77 Tests evaluation in an async call frame. | |
| 78 </p> | |
| 79 | |
| 80 </body> | |
| 81 </html> | |
| OLD | NEW |