3 <script src="/inspector/inspector-test.js"></script>
4 <script src="/inspector/debugger-test.js"></script>
5 <script src="/inspector/console-test.js"></script>
8 function testFunction()
12 setTimeout(timeout1, 0);
17 setTimeout(timeout2, 0);
27 var xhr = new XMLHttpRequest();
28 xhr.open("POST", "/failure/foo", true /* async */);
34 var maxAsyncCallStackDepth = 4;
35 var numberOfConsoleMessages = 2;
37 InspectorTest.setQuiet(true);
38 InspectorTest.startDebuggerTest(step1);
42 DebuggerAgent.setPauseOnExceptions(WebInspector.DebuggerModel.PauseOnExceptionsState.DontPauseOnExceptions);
43 DebuggerAgent.setAsyncCallStackDepth(0);
44 InspectorTest.runTestFunctionAndWaitUntilPaused(step2);
49 DebuggerAgent.setAsyncCallStackDepth(maxAsyncCallStackDepth, didPause);
54 InspectorTest.waitUntilNthMessageReceived(numberOfConsoleMessages, expandAndDumpConsoleMessages);
55 InspectorTest.resumeExecution();
58 function expandAndDumpConsoleMessages()
60 InspectorTest.expandConsoleMessages(dumpConsoleMessages);
63 function dumpConsoleMessages()
65 InspectorTest.dumpConsoleMessages(false, false, InspectorTest.textContentWithLineBreaks);
66 InspectorTest.completeDebuggerTest();
73 <body onload="runTest()">
75 Tests asynchronous call stacks printed in console for a Network.Initiator.