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

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

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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="../../../inspector/sources/debugger/resources/unformatted.js"></scr ipt> 5 <script src="../../../inspector/sources/debugger/resources/unformatted.js"></scr ipt>
6 6
7 <script> 7 <script>
8 8
9 function f1() 9 function f1()
10 { 10 {
11 var a=0;var b=1;var c=3;var d=4;var e=5; 11 var a=0;var b=1;var c=3;var d=4;var e=5;
12 var f=0; 12 var f=0;
13 return 0; 13 return 0;
14 } 14 }
15 15
16 function onload() 16 function onload()
17 { 17 {
18 if (window.testRunner) { 18 if (window.testRunner) {
19 testRunner.waitUntilDone(); 19 testRunner.waitUntilDone();
20 testRunner.showWebInspector(); 20 testRunner.showWebInspector();
21 } 21 }
22 runTest(); 22 runTest();
23 } 23 }
24 24
25 var test = function() 25 var test = function()
26 { 26 {
27 WebInspector.breakpointManager._storage._breakpoints = {}; 27 Bindings.breakpointManager._storage._breakpoints = {};
28 var panel = WebInspector.panels.sources; 28 var panel = UI.panels.sources;
29 var scriptFormatter; 29 var scriptFormatter;
30 var sourceFrame; 30 var sourceFrame;
31 31
32 InspectorTest.runDebuggerTestSuite([ 32 InspectorTest.runDebuggerTestSuite([
33 function testSetup(next) 33 function testSetup(next)
34 { 34 {
35 InspectorTest.scriptFormatter().then(function(sf) { 35 InspectorTest.scriptFormatter().then(function(sf) {
36 scriptFormatter = sf; 36 scriptFormatter = sf;
37 next(); 37 next();
38 }); 38 });
(...skipping 12 matching lines...) Expand all
51 } 51 }
52 52
53 function pausedInF1(callFrames) 53 function pausedInF1(callFrames)
54 { 54 {
55 InspectorTest.dumpBreakpointSidebarPane("while paused in raw"); 55 InspectorTest.dumpBreakpointSidebarPane("while paused in raw");
56 InspectorTest.resumeExecution(resumed); 56 InspectorTest.resumeExecution(resumed);
57 } 57 }
58 58
59 function resumed() 59 function resumed()
60 { 60 {
61 InspectorTest.addSniffer(WebInspector.ScriptFormatterEditorActio n.prototype, "_updateButton", uiSourceCodeScriptFormatted); 61 InspectorTest.addSniffer(Sources.ScriptFormatterEditorAction.pro totype, "_updateButton", uiSourceCodeScriptFormatted);
62 scriptFormatter._toggleFormatScriptSource(); 62 scriptFormatter._toggleFormatScriptSource();
63 } 63 }
64 64
65 function uiSourceCodeScriptFormatted() 65 function uiSourceCodeScriptFormatted()
66 { 66 {
67 // There should be a breakpoint in f1 although script is pretty- printed. 67 // There should be a breakpoint in f1 although script is pretty- printed.
68 InspectorTest.waitUntilPaused(pausedInF1Again); 68 InspectorTest.waitUntilPaused(pausedInF1Again);
69 InspectorTest.evaluateInPageWithTimeout("f1()"); 69 InspectorTest.evaluateInPageWithTimeout("f1()");
70 } 70 }
71 71
72 function pausedInF1Again(callFrames) 72 function pausedInF1Again(callFrames)
73 { 73 {
74 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed"); 74 InspectorTest.dumpBreakpointSidebarPane("while paused in pretty printed");
75 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibl eView.uiSourceCode()); 75 scriptFormatter._discardFormattedUISourceCodeScript(panel.visibl eView.uiSourceCode());
76 InspectorTest.addSniffer(WebInspector.JavaScriptBreakpointsSideb arPane.prototype, "didReceiveBreakpointLineForTest", onBreakpointsUpdated); 76 InspectorTest.addSniffer(Sources.JavaScriptBreakpointsSidebarPan e.prototype, "didReceiveBreakpointLineForTest", onBreakpointsUpdated);
77 } 77 }
78 78
79 function onBreakpointsUpdated() 79 function onBreakpointsUpdated()
80 { 80 {
81 InspectorTest.dumpBreakpointSidebarPane("while paused in raw"); 81 InspectorTest.dumpBreakpointSidebarPane("while paused in raw");
82 InspectorTest.removeBreakpoint(sourceFrame, 11); 82 InspectorTest.removeBreakpoint(sourceFrame, 11);
83 InspectorTest.resumeExecution(next); 83 InspectorTest.resumeExecution(next);
84 } 84 }
85 } 85 }
86 ]); 86 ]);
87 87
88 } 88 }
89 </script> 89 </script>
90 </head> 90 </head>
91 <body onload="onload()"> 91 <body onload="onload()">
92 <p>Tests the script formatting is working fine with breakpoints. 92 <p>Tests the script formatting is working fine with breakpoints.
93 </p> 93 </p>
94 </body> 94 </body>
95 </html> 95 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698