Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / sources / debugger-async / async-callstack.html
blobbfbdeb617d05ad2f01b30295e1bcba8704c22cb7
1 <html>
2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script>
7 function testFunction()
9 function innerTestFunction()
11 timeout1();
13 setTimeout(innerTestFunction, 0);
16 function timeout1()
18 debugger;
19 requestAnimationFrame(animFrame1);
20 var id = setInterval(innerInterval1, 0);
21 function innerInterval1()
23 clearInterval(id);
24 interval1();
28 function animFrame1()
30 debugger;
31 setTimeout(timeout2, 0);
32 requestAnimationFrame(animFrame2);
35 function interval1()
37 debugger;
40 function timeout2()
42 debugger;
45 function animFrame2()
47 debugger;
48 function longTail0()
50 timeout3();
52 var funcs = [];
53 for (var i = 0; i < 20; ++i)
54 funcs.push("function longTail" + (i + 1) + "() { setTimeout(longTail" + i + ", 0); };");
55 funcs.push("setTimeout(longTail" + i + ", 0);");
56 eval(funcs.join("\n"));
59 function timeout3()
61 debugger;
64 var test = function()
66 var totalDebuggerStatements = 6;
67 var maxAsyncCallStackDepth = 4;
68 InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallStackDepth);
71 </script>
72 </head>
74 <body onload="runTest()">
75 <p>
76 Tests asynchronous call stacks in debugger.
77 </p>
79 </body>
80 </html>