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/unformatted3.js"></script>
9 WebInspector
.breakpointManager
._storage
._breakpoints
= {};
10 var panel
= WebInspector
.panels
.sources
;
13 InspectorTest
.runDebuggerTestSuite([
14 function testSetup(next
)
16 InspectorTest
.scriptFormatter().then(function(sf
) {
22 function testBreakpointsSetInFormattedAndRemoveInOriginalSource(next
)
24 InspectorTest
.showScriptSource("unformatted3.js", didShowScriptSource
);
26 function didShowScriptSource(frame
)
28 InspectorTest
.addSniffer(WebInspector
.ScriptFormatterEditorAction
.prototype, "_updateButton", uiSourceCodeScriptFormatted
);
29 scriptFormatter
._toggleFormatScriptSource();
32 function uiSourceCodeScriptFormatted()
34 var formattedSourceFrame
= panel
.visibleView
;
35 InspectorTest
.setBreakpoint(formattedSourceFrame
, 3, "", true);
36 InspectorTest
.waitUntilPaused(pausedInF2
);
37 InspectorTest
.evaluateInPageWithTimeout("f2()");
40 function pausedInF2(callFrames
)
42 InspectorTest
.dumpBreakpointSidebarPane("while paused in pretty printed");
43 scriptFormatter
._discardFormattedUISourceCodeScript(panel
.visibleView
.uiSourceCode());
44 InspectorTest
.dumpBreakpointSidebarPane("while paused in raw");
45 // No need to remove breakpoint since formattedUISourceCode was removed.
46 InspectorTest
.resumeExecution(next
);
54 <body onload=
"runTest()">
55 <p>Tests the script formatting is working fine with breakpoints.