OLD | NEW |
---|---|
(Empty) | |
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 | |
6 <script> | |
7 | |
8 function doClose() | |
9 { | |
10 window.close(); | |
11 } | |
12 | |
13 | |
14 | |
15 function onload() | |
16 { | |
17 if (window.testRunner) { | |
18 testRunner.dumpAsText(); | |
19 testRunner.waitUntilDone(); | |
20 testRunner.showWebInspector(); | |
21 } | |
22 runTest(); | |
23 } | |
24 | |
25 var test = function() | |
26 { | |
27 function log(message) { | |
28 InspectorTest.evaluateInPage("console.log('"+ message +"')"); | |
29 } | |
30 | |
31 log("Starting test"); | |
32 WebInspector.inspectorView.showPanel("sources"); | |
33 var pane = WebInspector.panels.sources.sidebarPanes.eventListenerBreakpoints ; | |
34 InspectorTest.runDebuggerTestSuite([ | |
35 function testCloseBreakpoint(next) | |
36 { | |
37 log("Setting breakpoint"); | |
38 pane._setBreakpoint('instrumentation:close'); | |
39 | |
40 log("Calling window.close()"); | |
41 InspectorTest.waitUntilPaused(paused); | |
42 InspectorTest.evaluateInPage("doClose()"); | |
43 | |
44 function paused(callFrames, reason, breakpointIds, asyncStackTrace, auxData) | |
45 { | |
46 log("Paused in breakpoint"); | |
pfeldman
2014/07/22 08:57:40
You should dump the stack here to test that it is
| |
47 pane._removeBreakpoint('instrumentation:close'); | |
48 next(); | |
49 } | |
50 } | |
51 ]); | |
52 | |
53 } | |
54 </script> | |
55 </head> | |
56 <body onload="onload()"> | |
57 <p>Tests the window close breakpoint. | |
58 </p> | |
59 </body> | |
60 </html> | |
OLD | NEW |