3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
15 if (window.testRunner) {
16 testRunner.dumpAsText();
17 testRunner.waitUntilDone();
18 testRunner.showWebInspector();
25 // This is needed because Inspector.addResult() uses output() which places elements
26 // into the <body> which gets disposed along with the window
27 function log(message) {
28 InspectorTest.evaluateInPage("console.log(unescape('"+ escape(message) +"'));");
32 WebInspector.inspectorView.showPanel("sources");
33 var pane = WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints;
34 InspectorTest.startDebuggerTest(testCloseBreakpoint);
36 function testCloseBreakpoint(next)
38 log("Setting breakpoint");
39 pane._setBreakpoint('instrumentation:close');
41 log("Calling window.close()");
42 InspectorTest.waitUntilPaused(paused);
43 InspectorTest.evaluateInPage("doClose()");
45 function paused(callFrames)
47 log("Paused in breakpoint");
48 // get the first stack frame
49 log(InspectorTest.captureStackTraceIntoString(callFrames).split('\n')[1].trim());
51 pane._removeBreakpoint('instrumentation:close');
52 InspectorTest.completeDebuggerTest();
53 // After this point execution will resume and the window will close
59 <body onload="onload()">
60 <p>Tests the window close breakpoint.