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

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

Issue 2552923002: [DevTools] call setScriptSource callback right after editing (Closed)
Patch Set: Created 4 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/edit-me-2.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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-2.js"></script>
7 <script src="resources/edit-me-when-paused.js"></script> 8 <script src="resources/edit-me-when-paused.js"></script>
8 9
9 <script> 10 <script>
10 function loadScriptWithSyntaxError() 11 function loadScriptWithSyntaxError()
11 { 12 {
12 var script = document.createElement("script"); 13 var script = document.createElement("script");
13 script.src = "resources/edit-me-syntax-error.js"; 14 script.src = "resources/edit-me-syntax-error.js";
14 document.head.appendChild(script); 15 document.head.appendChild(script);
15 } 16 }
16 17
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 { 130 {
130 InspectorTest.waitJavaScriptSourceFrameBreakpoints(testSourceFra me) 131 InspectorTest.waitJavaScriptSourceFrameBreakpoints(testSourceFra me)
131 .then(() => InspectorTest.dumpJavaScriptSourceFrameBreakpoin ts(testSourceFrame)) 132 .then(() => InspectorTest.dumpJavaScriptSourceFrameBreakpoin ts(testSourceFrame))
132 .then(() => Bindings.breakpointManager._allBreakpoints().map (breakpoint => breakpoint.remove())) 133 .then(() => Bindings.breakpointManager._allBreakpoints().map (breakpoint => breakpoint.remove()))
133 .then(next); 134 .then(next);
134 } 135 }
135 }, 136 },
136 137
137 function testNoCrashWhenLiveEditOnBreakpoint(next) 138 function testNoCrashWhenLiveEditOnBreakpoint(next)
138 { 139 {
139 InspectorTest.showScriptSource("edit-me.js", didShowScriptSource); 140 InspectorTest.showScriptSource("edit-me-2.js", didShowScriptSource);
140 141
141 var testSourceFrame; 142 var testSourceFrame;
142 143
143 function didShowScriptSource(sourceFrame) 144 function didShowScriptSource(sourceFrame)
144 { 145 {
145 testSourceFrame = sourceFrame; 146 testSourceFrame = sourceFrame;
146 InspectorTest.prepareSourceFrameForBreakpointTest(sourceFrame); 147 InspectorTest.prepareSourceFrameForBreakpointTest(sourceFrame);
147 InspectorTest.waitJavaScriptSourceFrameBreakpoints(testSourceFra me).then(breakpointAdded); 148 InspectorTest.waitJavaScriptSourceFrameBreakpoints(testSourceFra me).then(breakpointAdded);
148 InspectorTest.setBreakpoint(sourceFrame, 3, "", true); 149 InspectorTest.setBreakpoint(sourceFrame, 3, "", true);
149 } 150 }
150 151
151 function breakpointAdded() 152 function breakpointAdded()
152 { 153 {
153 InspectorTest.waitUntilPaused(pausedInF); 154 InspectorTest.waitUntilPaused(pausedInF);
154 InspectorTest.evaluateInPage("setTimeout(f, 0)"); 155 InspectorTest.evaluateInPage("setTimeout(editMe2F, 0)");
155 } 156 }
156 157
157 function pausedInF(callFrames) 158 function pausedInF(callFrames)
158 { 159 {
159 replaceInSource(panel.visibleView, "function f()", "function f() \n", didEditScriptSource); 160 replaceInSource(panel.visibleView, "function editMe2F()", "funct ion editMe2F()\n", didEditScriptSource);
160 } 161 }
161 162
162 function didEditScriptSource() 163 function didEditScriptSource()
163 { 164 {
164 InspectorTest.resumeExecution(resumed); 165 InspectorTest.resumeExecution(resumed);
165 } 166 }
166 167
167 function resumed() 168 function resumed()
168 { 169 {
169 next(); 170 next();
(...skipping 11 matching lines...) Expand all
181 182
182 </script> 183 </script>
183 184
184 </head> 185 </head>
185 186
186 <body onload="runTest()"> 187 <body onload="runTest()">
187 <p>Tests live edit feature.</p> 188 <p>Tests live edit feature.</p>
188 189
189 </body> 190 </body>
190 </html> 191 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/sources/debugger/resources/edit-me-2.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698