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

Side by Side Diff: test/inspector/debugger/framework-break.js

Issue 2713023004: [inspector] added reconnect method for tests (Closed)
Patch Set: rebased Created 3 years, 9 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 // 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 print('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);
11 } 11 }
12 12
13 function throwCaughtError() { 13 function throwCaughtError() {
14 try { 14 try {
15 throw new Error(); 15 throw new Error();
16 } catch (e) { 16 } catch (e) {
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 schedulePauseOnNextStatement('', ''); 191 utils.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(() => cancelPauseOnNextStatement()) 196 .then(() => utils.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(() => schedulePauseOnNextStatement('', '')) 200 .then(() => utils.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
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 ]);
OLDNEW
« no previous file with comments | « test/inspector/debugger/es6-module-set-script-source.js ('k') | test/inspector/debugger/framework-nested-scheduled-break.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698