| Index: LayoutTests/inspector/debugger/async-callstack-eval.html
|
| diff --git a/LayoutTests/inspector/debugger/async-callstack-eval.html b/LayoutTests/inspector/debugger/async-callstack-eval.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..2b02e26b3b63169d2e1ca3b54e4e19a1fa3937dc
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/debugger/async-callstack-eval.html
|
| @@ -0,0 +1,79 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../http/tests/inspector/debugger-test.js"></script>
|
| +<script>
|
| +
|
| +var a = "FAIL";
|
| +function testFunction()
|
| +{
|
| + var a = "PASS";
|
| + function inner()
|
| + {
|
| + var b = a || "FAIL";
|
| + setTimeout(timeout, 0);
|
| + }
|
| + inner();
|
| +
|
| + a = b = "FAIL: re-assigned";
|
| +}
|
| +
|
| +function timeout()
|
| +{
|
| + var b = "FAIL";
|
| + debugger;
|
| +}
|
| +
|
| +var test = function()
|
| +{
|
| + var maxAsyncCallStackDepth = 4;
|
| +
|
| + InspectorTest.setQuiet(true);
|
| + InspectorTest.startDebuggerTest(step1);
|
| +
|
| + function step1()
|
| + {
|
| + DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, step2);
|
| + }
|
| +
|
| + function step2()
|
| + {
|
| + InspectorTest.runTestFunctionAndWaitUntilPaused(didPaused);
|
| + }
|
| +
|
| + function didPaused(callFrames, reason, breakpointIds, asyncStackTrace)
|
| + {
|
| + InspectorTest.captureStackTrace(callFrames, asyncStackTrace);
|
| +
|
| + var pane = WebInspector.panels.sources.sidebarPanes.callstack;
|
| + InspectorTest.addResult("Select call frame: " + pane.placards[1].title);
|
| + pane._placardSelected(pane.placards[1]);
|
| + InspectorTest.runAfterPendingDispatches(step3);
|
| + }
|
| +
|
| + function step3()
|
| + {
|
| + InspectorTest.evaluateInConsoleAndDump("a", step4);
|
| + }
|
| +
|
| + function step4()
|
| + {
|
| + InspectorTest.evaluateInConsoleAndDump("b", tearDown);
|
| + }
|
| +
|
| + function tearDown()
|
| + {
|
| + InspectorTest.completeDebuggerTest();
|
| + }
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +
|
| +<body onload="runTest()">
|
| +<p>
|
| +Tests evaluation in an async call frame.
|
| +</p>
|
| +
|
| +</body>
|
| +</html>
|
|
|