3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
5 <script src=
"../../../http/tests/inspector/console-test.js"></script>
8 function testFunction()
12 setTimeout(timeout1
, 0);
18 setTimeout(timeout2
, 0);
23 setTimeout(timeout3
, 0);
30 var iframeWidnow
= document
.getElementById("iframe").contentWindow
;
31 tryPostMessage(iframeWidnow
, "http://www.example.com");
34 function tryPostMessage(win
, origin
)
37 win
.postMessage("Trying origin=" + origin
, origin
);
39 console
.error("FAIL: Error sending message to " + origin
+ ". " + ex
);
45 var maxAsyncCallStackDepth
= 4;
46 var numberOfConsoleMessages
= 5;
48 InspectorTest
.setQuiet(true);
49 InspectorTest
.startDebuggerTest(step1
);
53 InspectorTest
.DebuggerAgent
.setPauseOnExceptions(WebInspector
.DebuggerModel
.PauseOnExceptionsState
.DontPauseOnExceptions
);
54 InspectorTest
.DebuggerAgent
.setAsyncCallStackDepth(0);
55 InspectorTest
.runTestFunctionAndWaitUntilPaused(step2
);
60 InspectorTest
.DebuggerAgent
.setAsyncCallStackDepth(maxAsyncCallStackDepth
, didPause
);
65 InspectorTest
.waitUntilNthMessageReceived(numberOfConsoleMessages
, expandAndDumpConsoleMessages
);
66 InspectorTest
.resumeExecution();
69 function expandAndDumpConsoleMessages()
71 InspectorTest
.expandConsoleMessages(dumpConsoleMessages
);
74 function dumpConsoleMessages()
76 InspectorTest
.dumpConsoleMessages(false, false, InspectorTest
.textContentWithLineBreaks
);
77 InspectorTest
.completeDebuggerTest();
84 <body onload=
"runTest()">
86 Tests asynchronous call stacks printed in console.
88 <div><iframe src=
"../debugger/resources/post-message-listener.html"
89 id=
"iframe" width=
"800" height=
"100" style=
"border: 1px solid black;">