3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script src="resources/unformatted3.js"></script>
9 WebInspector.breakpointManager._storage._breakpoints = {};
10 var panel = WebInspector.inspectorView.showPanel("sources");
11 var scriptFormatter = InspectorTest.scriptFormatter();
13 InspectorTest.runDebuggerTestSuite([
14 function testBreakpointsSetInFormattedAndRemoveInOriginalSource(next)
16 InspectorTest.showScriptSource("unformatted3.js", didShowScriptSource);
18 function didShowScriptSource(frame)
20 InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted);
21 scriptFormatter._toggleFormatScriptSource();
24 function uiSourceCodeScriptFormatted()
26 var formattedSourceFrame = panel.visibleView;
27 InspectorTest.setBreakpoint(formattedSourceFrame, 3, "", true);
28 InspectorTest.waitUntilPaused(pausedInF2);
29 InspectorTest.evaluateInPageWithTimeout("f2()");
32 function pausedInF2(callFrames)
34 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed");
35 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibleView.uiSourceCode());
36 InspectorTest.dumpBreakpointSidebarPane("while paused in raw");
37 // No need to remove breakpoint since formattedUISourceCode was removed.
38 InspectorTest.resumeExecution(next);
46 <body onload="runTest()">
47 <p>Tests the script formatting is working fine with breakpoints.