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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/sources/debugger/live-edit.html

Issue 2500493003: [DevTools] make breakpoints better (Closed)
Patch Set: fixed context menu items for gutter 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="../../../http/tests/inspector/live-edit-test.js"></script> 5 <script src="../../../http/tests/inspector/live-edit-test.js"></script>
6 <script src="resources/edit-me.js"></script> 6 <script src="resources/edit-me.js"></script>
7 <script src="resources/edit-me-when-paused.js"></script> 7 <script src="resources/edit-me-when-paused.js"></script>
8 8
9 <script> 9 <script>
10 function loadScriptWithSyntaxError() 10 function loadScriptWithSyntaxError()
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind (InspectorTest, InspectorTest.resumeExecution.bind(InspectorTest, next))); 106 InspectorTest.resumeExecution(InspectorTest.waitUntilPaused.bind (InspectorTest, InspectorTest.resumeExecution.bind(InspectorTest, next)));
107 } 107 }
108 }, 108 },
109 109
110 function testBreakpointsUpdated(next) 110 function testBreakpointsUpdated(next)
111 { 111 {
112 InspectorTest.showScriptSource("edit-me.js", didShowScriptSource); 112 InspectorTest.showScriptSource("edit-me.js", didShowScriptSource);
113 113
114 function didShowScriptSource(sourceFrame) 114 function didShowScriptSource(sourceFrame)
115 { 115 {
116 InspectorTest.addSniffer(sourceFrame, "_addBreakpointDecoration" , breakpointAdded); 116 InspectorTest.addSniffer(sourceFrame, "_updateBreakpointDecorati on", breakpointAdded);
117 InspectorTest.setBreakpoint(sourceFrame, 2, "", true); 117 InspectorTest.setBreakpoint(sourceFrame, 2, "", true);
118 } 118 }
119 119
120 function breakpointAdded() 120 function breakpointAdded()
121 { 121 {
122 replaceInSource(panel.visibleView, "function f()", "function new FunctionCreatedWithLiveEdit()\n{\n}\nfunction f()", didEditScriptSource); 122 replaceInSource(panel.visibleView, "function f()", "function new FunctionCreatedWithLiveEdit()\n{\n}\nfunction f()", didEditScriptSource);
123 } 123 }
124 124
125 function didEditScriptSource() 125 function didEditScriptSource()
126 { 126 {
127 var breakpoints = panel.visibleView._breakpoints; 127 var breakpoints = panel.visibleView._breakpoints;
128 for (var lineNumber in breakpoints) 128 for (var lineNumber in breakpoints)
129 InspectorTest.assertEquals("5", lineNumber); 129 InspectorTest.assertEquals("5", lineNumber);
130 next(); 130 next();
131 } 131 }
132 }, 132 },
133 133
134 function testNoCrashWhenLiveEditOnBreakpoint(next) 134 function testNoCrashWhenLiveEditOnBreakpoint(next)
135 { 135 {
136 InspectorTest.showScriptSource("edit-me.js", didShowScriptSource); 136 InspectorTest.showScriptSource("edit-me.js", didShowScriptSource);
137 137
138 var testSourceFrame; 138 var testSourceFrame;
139 139
140 function didShowScriptSource(sourceFrame) 140 function didShowScriptSource(sourceFrame)
141 { 141 {
142 testSourceFrame = sourceFrame; 142 testSourceFrame = sourceFrame;
143 InspectorTest.addSniffer(sourceFrame, "_addBreakpointDecoration" , uiBreakpointAdded); 143 InspectorTest.addSniffer(sourceFrame, "_updateBreakpointDecorati on", uiBreakpointAdded);
144 InspectorTest.setBreakpoint(sourceFrame, 3, "", true); 144 InspectorTest.setBreakpoint(sourceFrame, 3, "", true);
145 } 145 }
146 146
147 function uiBreakpointAdded() { 147 function uiBreakpointAdded() {
148 InspectorTest.addSniffer(testSourceFrame, "_addBreakpointDecorat ion", breakpointAdded); 148 InspectorTest.addSniffer(testSourceFrame, "_updateBreakpointDeco ration", breakpointAdded);
149 } 149 }
150 150
151 function breakpointAdded() 151 function breakpointAdded()
152 { 152 {
153 InspectorTest.waitUntilPaused(pausedInF); 153 InspectorTest.waitUntilPaused(pausedInF);
154 InspectorTest.evaluateInPage("setTimeout(f, 0)"); 154 InspectorTest.evaluateInPage("setTimeout(f, 0)");
155 } 155 }
156 156
157 function pausedInF(callFrames) 157 function pausedInF(callFrames)
158 { 158 {
(...skipping 22 matching lines...) Expand all
181 181
182 </script> 182 </script>
183 183
184 </head> 184 </head>
185 185
186 <body onload="runTest()"> 186 <body onload="runTest()">
187 <p>Tests live edit feature.</p> 187 <p>Tests live edit feature.</p>
188 188
189 </body> 189 </body>
190 </html> 190 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698