3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/debugger-test.js"></script>
7 function testFunction()
9 function innerTestFunction()
13 setTimeout(innerTestFunction, 0);
14 document.getElementById("image").addEventListener("error", imageErrorHandler, false);
20 requestAnimationFrame(animFrame1);
21 var id = setInterval(innerInterval1, 0);
22 function innerInterval1()
32 setTimeout(timeout2, 0);
33 requestAnimationFrame(animFrame2);
48 document.getElementById("image").addEventListener("error", imageErrorHandler, true);
49 document.getElementById("image").addEventListener("click", imageClickHandlerSync, true);
56 for (var i = 0; i < 20; ++i)
57 funcs.push("function longTail" + (i + 1) + "() { setTimeout(longTail" + i + ", 0); };");
58 funcs.push("setTimeout(longTail" + i + ", 0);");
59 eval(funcs.join("\n"));
65 image.src = "non_existing.png";
69 function imageErrorHandler()
71 debugger; // should hit 3 times with different async stacks
74 function imageClickHandlerSync()
76 debugger; // synchronous call => should have same async call chain as for timeout3()
81 var totalDebuggerStatements = 10;
82 var maxAsyncCallStackDepth = 4;
83 InspectorTest.runAsyncCallStacksTest(totalDebuggerStatements, maxAsyncCallStackDepth);
89 <body onload="runTest()">
91 Tests asynchronous call stacks in debugger.
93 <img id="image" onerror="imageErrorHandler()"></img>