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

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

Issue 2887903002: [DevTools] update decorations when there is no pending possibleBreakpoints (Closed)
Patch Set: better tests Created 3 years, 7 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="../../../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-2.js"></script>
8 <script src="resources/edit-me-when-paused.js"></script> 8 <script src="resources/edit-me-when-paused.js"></script>
9 9
10 <script> 10 <script>
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 }, 110 },
111 111
112 function testBreakpointsUpdated(next) 112 function testBreakpointsUpdated(next)
113 { 113 {
114 var testSourceFrame; 114 var testSourceFrame;
115 InspectorTest.showScriptSource("edit-me.js", didShowScriptSource); 115 InspectorTest.showScriptSource("edit-me.js", didShowScriptSource);
116 116
117 function didShowScriptSource(sourceFrame) 117 function didShowScriptSource(sourceFrame)
118 { 118 {
119 testSourceFrame = sourceFrame; 119 testSourceFrame = sourceFrame;
120 InspectorTest.prepareSourceFrameForBreakpointTest(sourceFrame);
121 InspectorTest.waitJavaScriptSourceFrameBreakpoints(sourceFrame). then(breakpointAdded); 120 InspectorTest.waitJavaScriptSourceFrameBreakpoints(sourceFrame). then(breakpointAdded);
122 InspectorTest.setBreakpoint(sourceFrame, 2, "", true); 121 InspectorTest.setBreakpoint(sourceFrame, 2, "", true);
123 } 122 }
124 123
125 function breakpointAdded() 124 function breakpointAdded()
126 { 125 {
127 replaceInSource(panel.visibleView, "function f()", "function new FunctionCreatedWithLiveEdit()\n{\n}\nfunction f()", didEditScriptSource); 126 replaceInSource(panel.visibleView, "function f()", "function new FunctionCreatedWithLiveEdit()\n{\n}\nfunction f()", didEditScriptSource);
128 } 127 }
129 128
130 function didEditScriptSource() 129 function didEditScriptSource()
131 { 130 {
132 InspectorTest.waitJavaScriptSourceFrameBreakpoints(testSourceFra me) 131 InspectorTest.waitJavaScriptSourceFrameBreakpoints(testSourceFra me)
133 .then(() => InspectorTest.dumpJavaScriptSourceFrameBreakpoin ts(testSourceFrame)) 132 .then(() => InspectorTest.dumpJavaScriptSourceFrameBreakpoin ts(testSourceFrame))
134 .then(() => Bindings.breakpointManager._allBreakpoints().map (breakpoint => breakpoint.remove())) 133 .then(() => Bindings.breakpointManager._allBreakpoints().map (breakpoint => breakpoint.remove()))
135 .then(next); 134 .then(next);
136 } 135 }
137 }, 136 },
138 137
139 function testNoCrashWhenLiveEditOnBreakpoint(next) 138 function testNoCrashWhenLiveEditOnBreakpoint(next)
140 { 139 {
141 InspectorTest.showScriptSource("edit-me-2.js", didShowScriptSource); 140 InspectorTest.showScriptSource("edit-me-2.js", didShowScriptSource);
142 141
143 var testSourceFrame; 142 var testSourceFrame;
144 143
145 function didShowScriptSource(sourceFrame) 144 function didShowScriptSource(sourceFrame)
146 { 145 {
147 testSourceFrame = sourceFrame; 146 testSourceFrame = sourceFrame;
148 InspectorTest.prepareSourceFrameForBreakpointTest(sourceFrame);
149 InspectorTest.waitJavaScriptSourceFrameBreakpoints(testSourceFra me).then(breakpointAdded); 147 InspectorTest.waitJavaScriptSourceFrameBreakpoints(testSourceFra me).then(breakpointAdded);
150 InspectorTest.setBreakpoint(sourceFrame, 3, "", true); 148 InspectorTest.setBreakpoint(sourceFrame, 3, "", true);
151 } 149 }
152 150
153 function breakpointAdded() 151 function breakpointAdded()
154 { 152 {
155 InspectorTest.waitUntilPaused(pausedInF); 153 InspectorTest.waitUntilPaused(pausedInF);
156 InspectorTest.evaluateInPage("setTimeout(editMe2F, 0)"); 154 InspectorTest.evaluateInPage("setTimeout(editMe2F, 0)");
157 } 155 }
158 156
(...skipping 24 matching lines...) Expand all
183 181
184 </script> 182 </script>
185 183
186 </head> 184 </head>
187 185
188 <body onload="runTest()"> 186 <body onload="runTest()">
189 <p>Tests live edit feature.</p> 187 <p>Tests live edit feature.</p>
190 188
191 </body> 189 </body>
192 </html> 190 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698