OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // Flags: --allow-natives-syntax | 4 // Flags: --allow-natives-syntax |
5 | 5 |
6 InspectorTest.log('Checks that breaks in framework code correctly processed.'); | 6 InspectorTest.log('Checks that breaks in framework code correctly processed.'); |
7 | 7 |
8 InspectorTest.addScript(` | 8 InspectorTest.addScript(` |
9 function frameworkAssert() { | 9 function frameworkAssert() { |
10 console.assert(false); | 10 console.assert(false); |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 }, | 181 }, |
182 | 182 |
183 function testSyncDOMBreakpointWithInlinedUserFrame(next) { | 183 function testSyncDOMBreakpointWithInlinedUserFrame(next) { |
184 InspectorTest.log('> mixed, top frame in framework:'); | 184 InspectorTest.log('> mixed, top frame in framework:'); |
185 Protocol.Runtime | 185 Protocol.Runtime |
186 .evaluate({expression: 'syncDOMBreakpointWithInlinedUserFrame()//# sourc
eURL=framework.js'}) | 186 .evaluate({expression: 'syncDOMBreakpointWithInlinedUserFrame()//# sourc
eURL=framework.js'}) |
187 .then(next); | 187 .then(next); |
188 }, | 188 }, |
189 | 189 |
190 function testAsyncDOMBreakpoint(next) { | 190 function testAsyncDOMBreakpoint(next) { |
191 utils.schedulePauseOnNextStatement('', ''); | 191 InspectorTest.contextGroup.schedulePauseOnNextStatement('', ''); |
192 InspectorTest.log('> all frames in framework:'); | 192 InspectorTest.log('> all frames in framework:'); |
193 Protocol.Runtime | 193 Protocol.Runtime |
194 .evaluate( | 194 .evaluate( |
195 {expression: 'asyncDOMBreakpoint()//# sourceURL=framework.js'}) | 195 {expression: 'asyncDOMBreakpoint()//# sourceURL=framework.js'}) |
196 .then(() => utils.cancelPauseOnNextStatement()) | 196 .then(() => InspectorTest.contextGroup.cancelPauseOnNextStatement()) |
197 .then( | 197 .then( |
198 () => Protocol.Runtime.evaluate( | 198 () => Protocol.Runtime.evaluate( |
199 {expression: '42//# sourceURL=user.js'})) | 199 {expression: '42//# sourceURL=user.js'})) |
200 .then(() => utils.schedulePauseOnNextStatement('', '')) | 200 .then(() => InspectorTest.contextGroup.schedulePauseOnNextStatement('',
'')) |
201 .then( | 201 .then( |
202 () => Protocol.Runtime.evaluate( | 202 () => Protocol.Runtime.evaluate( |
203 {expression: 'asyncDOMBreakpoint()//# sourceURL=user.js'})) | 203 {expression: 'asyncDOMBreakpoint()//# sourceURL=user.js'})) |
204 .then(next); | 204 .then(next); |
205 }, | 205 }, |
206 | 206 |
207 function testCaughtSyntaxError(next) { | 207 function testCaughtSyntaxError(next) { |
208 Protocol.Debugger.setPauseOnExceptions({state: 'all'}) | 208 Protocol.Debugger.setPauseOnExceptions({state: 'all'}) |
209 .then(() => InspectorTest.log('> all frames in framework:')) | 209 .then(() => InspectorTest.log('> all frames in framework:')) |
210 .then(() => Protocol.Runtime.evaluate({ | 210 .then(() => Protocol.Runtime.evaluate({ |
(...skipping 14 matching lines...) Expand all Loading... |
225 () => Protocol.Runtime.evaluate( | 225 () => Protocol.Runtime.evaluate( |
226 {expression: 'throwFromJSONParse()//# sourceURL=framework.js'})) | 226 {expression: 'throwFromJSONParse()//# sourceURL=framework.js'})) |
227 .then(() => InspectorTest.log('> mixed, top frame in framework:')) | 227 .then(() => InspectorTest.log('> mixed, top frame in framework:')) |
228 .then( | 228 .then( |
229 () => Protocol.Runtime.evaluate( | 229 () => Protocol.Runtime.evaluate( |
230 {expression: 'throwFromJSONParse()//# sourceURL=user.js'})) | 230 {expression: 'throwFromJSONParse()//# sourceURL=user.js'})) |
231 .then(() => Protocol.Debugger.setPauseOnExceptions({state: 'none'})) | 231 .then(() => Protocol.Debugger.setPauseOnExceptions({state: 'none'})) |
232 .then(next); | 232 .then(next); |
233 } | 233 } |
234 ]); | 234 ]); |
OLD | NEW |