Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-enabled / sources / debugger / script-formatter-breakpoints-4.html
blob88280eeacfffcf8f35ee57c9b42a86c9208acc47
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 <script src="../../../inspector/sources/debugger/resources/unformatted4.js"></script>
7 <script>
9 function f1()
11 var a=0;var b=1;var c=3;var d=4;var e=5;
12 var f=0;
13 return 0;
16 function onload()
18 if (window.testRunner) {
19 testRunner.waitUntilDone();
20 testRunner.showWebInspector();
22 runTest();
25 var test = function()
27 WebInspector.breakpointManager._storage._breakpoints = {};
28 var panel = WebInspector.panels.sources;
29 var scriptFormatter;
31 InspectorTest.runDebuggerTestSuite([
32 function testSetup(next)
34 InspectorTest.scriptFormatter().then(function(sf) {
35 scriptFormatter = sf;
36 next();
37 });
40 function testBreakpointSetInOriginalAndRemovedInFormatted(next)
42 InspectorTest.showScriptSource("script-formatter-breakpoints-4.html", didShowScriptSource);
44 function didShowScriptSource(sourceFrame)
46 InspectorTest.addResult("Adding breakpoint.");
47 InspectorTest.addSniffer(WebInspector.BreakpointManager.TargetBreakpoint.prototype, "_addResolvedLocation", breakpointResolved);
48 InspectorTest.setBreakpoint(sourceFrame, 11, "", true);
51 function breakpointResolved()
53 InspectorTest.addResult("Formatting.");
54 InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted);
55 scriptFormatter._toggleFormatScriptSource();
58 function uiSourceCodeScriptFormatted()
60 InspectorTest.addResult("Removing breakpoint.");
61 var formattedSourceFrame = panel.visibleView;
62 InspectorTest.removeBreakpoint(formattedSourceFrame, 19);
63 InspectorTest.addResult("Unformatting.");
64 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibleView.uiSourceCode());
65 var breakpoints = WebInspector.breakpointManager._storage._setting.get();
66 InspectorTest.assertEquals(breakpoints.length, 0, "There should not be any breakpoints in the storage.");
67 next();
70 ]);
73 </script>
74 </head>
75 <body onload="onload()">
76 <p>Tests the script formatting is working fine with breakpoints.
77 </p>
78 </body>
79 </html>