Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger-ui/script-formatter-breakpoints-2.html

Issue 2801543002: DevTools: simplify ScriptFormatterEditorAction (Closed)
Patch Set: fixed cleanup Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/debugger-test.js"></script> 4 <script src="../../../http/tests/inspector/debugger-test.js"></script>
5 <script src="../debugger/resources/unformatted2.js"></script> 5 <script src="../debugger/resources/unformatted2.js"></script>
6 <script> 6 <script>
7 var test = function() 7 var test = function()
8 { 8 {
9 Bindings.breakpointManager._storage._breakpoints = {}; 9 Bindings.breakpointManager._storage._breakpoints = {};
10 var panel = UI.panels.sources; 10 var panel = UI.panels.sources;
(...skipping 11 matching lines...) Expand all
22 22
23 function testBreakpointsSetAndRemoveInFormattedSource(next) 23 function testBreakpointsSetAndRemoveInFormattedSource(next)
24 { 24 {
25 InspectorTest.showScriptSource("unformatted2.js", didShowScriptSourc e); 25 InspectorTest.showScriptSource("unformatted2.js", didShowScriptSourc e);
26 26
27 function didShowScriptSource(frame) 27 function didShowScriptSource(frame)
28 { 28 {
29 InspectorTest.addSniffer(Sources.ScriptFormatterEditorAction.pro totype, "_updateButton", uiSourceCodeScriptFormatted); 29 InspectorTest.addSniffer(Sources.ScriptFormatterEditorAction.pro totype, "_updateButton", uiSourceCodeScriptFormatted);
30 scriptFormatter._toggleFormatScriptSource(); 30 scriptFormatter._toggleFormatScriptSource();
31 } 31 }
32 32
33 function uiSourceCodeScriptFormatted() 33 function uiSourceCodeScriptFormatted()
34 { 34 {
35 formattedSourceFrame = panel.visibleView; 35 formattedSourceFrame = panel.visibleView;
36 InspectorTest.setBreakpoint(formattedSourceFrame, 3, "", true); 36 InspectorTest.setBreakpoint(formattedSourceFrame, 3, "", true);
37 InspectorTest.waitBreakpointSidebarPane().then(evaluateF2); 37 InspectorTest.waitBreakpointSidebarPane().then(evaluateF2);
38 } 38 }
39 39
40 function evaluateF2() { 40 function evaluateF2() {
41 InspectorTest.waitUntilPaused(pausedInF2); 41 InspectorTest.waitUntilPaused(pausedInF2);
42 InspectorTest.evaluateInPageWithTimeout("f2()"); 42 InspectorTest.evaluateInPageWithTimeout("f2()");
43 } 43 }
44 44
45 function pausedInF2(callFrames) 45 function pausedInF2(callFrames)
46 { 46 {
47 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed"); 47 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed");
48 InspectorTest.waitBreakpointSidebarPane() 48 InspectorTest.waitBreakpointSidebarPane()
49 .then(() => InspectorTest.dumpBreakpointSidebarPane("while p aused in raw")) 49 .then(() => InspectorTest.dumpBreakpointSidebarPane("while p aused in raw"))
50 .then(() => InspectorTest.resumeExecution(next)); 50 .then(() => InspectorTest.resumeExecution(next));
51 InspectorTest.removeBreakpoint(formattedSourceFrame, 3); 51 InspectorTest.removeBreakpoint(formattedSourceFrame, 3);
52 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibl eView.uiSourceCode()); 52 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibl eView.uiSourceCode(), true);
53 } 53 }
54 } 54 }
55 ]); 55 ]);
56 56
57 } 57 }
58 </script> 58 </script>
59 </head> 59 </head>
60 <body onload="runTest()"> 60 <body onload="runTest()">
61 <p>Tests the script formatting is working fine with breakpoints. 61 <p>Tests the script formatting is working fine with breakpoints.
62 </p> 62 </p>
63 </body> 63 </body>
64 </html> 64 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698