Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger-async / async-callstack-eval.html
blob5063c695ab24b64cd6dedb39116b75ccbf18e148
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>
8 var a = "FAIL";
9 function testFunction()
11 var a = "PASS";
12 function inner()
14 var b = a || "FAIL";
15 setTimeout(timeout, 0);
17 inner();
19 a = b = "FAIL: re-assigned";
22 function timeout()
24 var b = "FAIL";
25 debugger;
28 var test = function()
30 var maxAsyncCallStackDepth = 4;
32 InspectorTest.setQuiet(true);
33 InspectorTest.startDebuggerTest(step1);
35 function step1()
37 InspectorTest.DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, step2);
40 function step2()
42 InspectorTest.runTestFunctionAndWaitUntilPaused(didPause);
45 function didPause(callFrames, reason, breakpointIds, asyncStackTrace)
47 InspectorTest.captureStackTrace(callFrames, asyncStackTrace);
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);
56 function step3()
58 InspectorTest.evaluateInConsoleAndDump("a", step4);
61 function step4()
63 InspectorTest.evaluateInConsoleAndDump("b", tearDown);
66 function tearDown()
68 InspectorTest.completeDebuggerTest();
72 </script>
73 </head>
75 <body onload="runTest()">
76 <p>
77 Tests evaluation in an async call frame.
78 </p>
80 </body>
81 </html>