Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-enabled / sources / debugger / script-formatter-breakpoints-1.html
blob15982a579e38ed952a481c8c7a5a8c3fccb81011
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/unformatted.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;
30 var sourceFrame;
32 InspectorTest.runDebuggerTestSuite([
33 function testSetup(next)
35 InspectorTest.scriptFormatter().then(function(sf) {
36 scriptFormatter = sf;
37 next();
38 });
41 function testBreakpointsInOriginalAndFormattedSource(next)
43 InspectorTest.showScriptSource("script-formatter-breakpoints-1.html", didShowScriptSource);
45 function didShowScriptSource(frame)
47 sourceFrame = frame;
48 InspectorTest.setBreakpoint(sourceFrame, 11, "", true);
49 InspectorTest.waitUntilPaused(pausedInF1);
50 InspectorTest.evaluateInPageWithTimeout("f1()");
53 function pausedInF1(callFrames)
55 InspectorTest.dumpBreakpointSidebarPane("while paused in raw");
56 InspectorTest.resumeExecution(resumed);
59 function resumed()
61 InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorAction.prototype, "_updateButton", uiSourceCodeScriptFormatted);
62 scriptFormatter._toggleFormatScriptSource();
65 function uiSourceCodeScriptFormatted()
67 // There should be a breakpoint in f1 although script is pretty-printed.
68 InspectorTest.waitUntilPaused(pausedInF1Again);
69 InspectorTest.evaluateInPageWithTimeout("f1()");
72 function pausedInF1Again(callFrames)
74 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed");
75 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibleView.uiSourceCode());
76 InspectorTest.dumpBreakpointSidebarPane("while paused in raw");
77 InspectorTest.removeBreakpoint(sourceFrame, 11);
78 InspectorTest.resumeExecution(next);
81 ]);
84 </script>
85 </head>
86 <body onload="onload()">
87 <p>Tests the script formatting is working fine with breakpoints.
88 </p>
89 </body>
90 </html>