| Index: LayoutTests/inspector/debugger/async-callstack.html
|
| diff --git a/LayoutTests/inspector/debugger/async-callstack.html b/LayoutTests/inspector/debugger/async-callstack.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..aa9332ae315d36dc71e846cf06d5a7fdd0e0f64b
|
| --- /dev/null
|
| +++ b/LayoutTests/inspector/debugger/async-callstack.html
|
| @@ -0,0 +1,102 @@
|
| +<html>
|
| +<head>
|
| +<script src="../../http/tests/inspector/inspector-test.js"></script>
|
| +<script src="../../http/tests/inspector/debugger-test.js"></script>
|
| +<script>
|
| +
|
| +function testFunction()
|
| +{
|
| + function innerTestFunction()
|
| + {
|
| + timeout1();
|
| + }
|
| + setTimeout(innerTestFunction, 0);
|
| +}
|
| +
|
| +function timeout1()
|
| +{
|
| + debugger;
|
| + requestAnimationFrame(animFrame1);
|
| + var id = setInterval(innerInterval1, 0);
|
| + function innerInterval1()
|
| + {
|
| + clearInterval(id);
|
| + interval1();
|
| + }
|
| +}
|
| +
|
| +function animFrame1()
|
| +{
|
| + debugger;
|
| + setTimeout(timeout2, 0);
|
| + requestAnimationFrame(animFrame2);
|
| +}
|
| +
|
| +function interval1()
|
| +{
|
| + debugger;
|
| +}
|
| +
|
| +function timeout2()
|
| +{
|
| + debugger;
|
| +}
|
| +
|
| +function animFrame2()
|
| +{
|
| + debugger;
|
| + function longTail0()
|
| + {
|
| + timeout3();
|
| + }
|
| + var funcs = [];
|
| + for (var i = 0; i < 20; ++i)
|
| + funcs.push("function longTail" + (i + 1) + "() { setTimeout(longTail" + i + ", 0); };");
|
| + funcs.push("setTimeout(longTail" + i + ", 0);");
|
| + eval(funcs.join("\n"));
|
| +}
|
| +
|
| +function timeout3()
|
| +{
|
| + debugger;
|
| +}
|
| +
|
| +var test = function()
|
| +{
|
| + var totalDebuggerStatements = 6;
|
| + var maxAsyncCallStackDepth = 4;
|
| +
|
| + InspectorTest.startDebuggerTest(step1);
|
| +
|
| + function step1()
|
| + {
|
| + DebuggerAgent.enableAsyncCallStacks(maxAsyncCallStackDepth, step2);
|
| + }
|
| +
|
| + function step2()
|
| + {
|
| + InspectorTest.runTestFunctionAndWaitUntilPaused(didPaused);
|
| + }
|
| +
|
| + var step = 0;
|
| + function didPaused(callFrames)
|
| + {
|
| + ++step;
|
| + InspectorTest.captureStackTrace(callFrames, { printAsyncCallStack: true });
|
| + if (step < totalDebuggerStatements)
|
| + InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind(InspectorTest, didPaused));
|
| + else
|
| + InspectorTest.completeDebuggerTest();
|
| + }
|
| +}
|
| +
|
| +</script>
|
| +</head>
|
| +
|
| +<body onload="runTest()">
|
| +<p>
|
| +Tests asynchronous call stacks in debugger.
|
| +</p>
|
| +
|
| +</body>
|
| +</html>
|
|
|