3 <script src=
"../../../http/tests/inspector/inspector-test.js"></script>
4 <script src=
"../../../http/tests/inspector/debugger-test.js"></script>
5 <script src=
"../debugger/resources/unformatted2.js"></script>
9 WebInspector
.breakpointManager
._storage
._breakpoints
= {};
10 var panel
= WebInspector
.panels
.sources
;
12 var formattedSourceFrame
;
14 InspectorTest
.runDebuggerTestSuite([
15 function testSetup(next
)
17 InspectorTest
.scriptFormatter().then(function(sf
) {
23 function testBreakpointsSetAndRemoveInFormattedSource(next
)
25 InspectorTest
.showScriptSource("unformatted2.js", didShowScriptSource
);
27 function didShowScriptSource(frame
)
29 InspectorTest
.addSniffer(WebInspector
.ScriptFormatterEditorAction
.prototype, "_updateButton", uiSourceCodeScriptFormatted
);
30 scriptFormatter
._toggleFormatScriptSource();
33 function uiSourceCodeScriptFormatted()
35 formattedSourceFrame
= panel
.visibleView
;
36 InspectorTest
.setBreakpoint(formattedSourceFrame
, 3, "", true);
37 InspectorTest
.waitUntilPaused(pausedInF2
);
38 InspectorTest
.evaluateInPageWithTimeout("f2()");
41 function pausedInF2(callFrames
)
43 InspectorTest
.dumpBreakpointSidebarPane("while paused in pretty printed");
44 InspectorTest
.removeBreakpoint(formattedSourceFrame
, 3);
45 scriptFormatter
._discardFormattedUISourceCodeScript(panel
.visibleView
.uiSourceCode());
46 InspectorTest
.dumpBreakpointSidebarPane("while paused in raw");
47 InspectorTest
.resumeExecution(next
);
55 <body onload=
"runTest()">
56 <p>Tests the script formatting is working fine with breakpoints.