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

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

Issue 2656743003: [inspector] take into account inlined frames in ::HasNonBlackboxedFrameOnStack (Closed)
Patch Set: little fix in test Created 3 years, 11 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
« no previous file with comments | « src/debug/debug.h ('k') | test/inspector/debugger/framework-break-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 print('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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 } 52 }
53 53
54 function throwInlinedUncaughtError() { 54 function throwInlinedUncaughtError() {
55 function inlinedWrapper() { 55 function inlinedWrapper() {
56 throwUserException(); 56 throwUserException();
57 } 57 }
58 %OptimizeFunctionOnNextCall(inlinedWrapper); 58 %OptimizeFunctionOnNextCall(inlinedWrapper);
59 inlinedWrapper(); 59 inlinedWrapper();
60 } 60 }
61 61
62 function syncDOMBreakpointWithInlinedUserFrame() {
63 function inlinedWrapper() {
64 userFunction();
65 }
66 %OptimizeFunctionOnNextCall(inlinedWrapper);
67 inlinedWrapper();
68 }
69
62 //# sourceURL=framework.js`, 8, 26); 70 //# sourceURL=framework.js`, 8, 26);
63 71
64 InspectorTest.addScript(` 72 InspectorTest.addScript(`
65 function throwUserException() { 73 function throwUserException() {
66 throw new Error(); 74 throw new Error();
67 } 75 }
76
77 function userFunction() {
78 syncDOMBreakpoint();
79 }
80
68 //# sourceURL=user.js`, 64, 26) 81 //# sourceURL=user.js`, 64, 26)
69 82
70 InspectorTest.setupScriptMap(); 83 InspectorTest.setupScriptMap();
71 Protocol.Debugger.onPaused(message => { 84 Protocol.Debugger.onPaused(message => {
72 InspectorTest.logCallFrames(message.params.callFrames); 85 InspectorTest.logCallFrames(message.params.callFrames);
73 InspectorTest.log(''); 86 InspectorTest.log('');
74 Protocol.Debugger.resume(); 87 Protocol.Debugger.resume();
75 }); 88 });
76 89
77 Protocol.Debugger.enable(); 90 Protocol.Debugger.enable();
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 InspectorTest.log('> all frames in framework:'); 173 InspectorTest.log('> all frames in framework:');
161 Protocol.Runtime 174 Protocol.Runtime
162 .evaluate({expression: 'syncDOMBreakpoint()//# sourceURL=framework.js'}) 175 .evaluate({expression: 'syncDOMBreakpoint()//# sourceURL=framework.js'})
163 .then(() => InspectorTest.log('> mixed, top frame in framework:')) 176 .then(() => InspectorTest.log('> mixed, top frame in framework:'))
164 .then( 177 .then(
165 () => Protocol.Runtime.evaluate( 178 () => Protocol.Runtime.evaluate(
166 {expression: 'syncDOMBreakpoint()//# sourceURL=user.js'})) 179 {expression: 'syncDOMBreakpoint()//# sourceURL=user.js'}))
167 .then(next); 180 .then(next);
168 }, 181 },
169 182
183 function testSyncDOMBreakpointWithInlinedUserFrame(next) {
184 InspectorTest.log('> mixed, top frame in framework:');
185 Protocol.Runtime
186 .evaluate({expression: 'syncDOMBreakpointWithInlinedUserFrame()//# sourc eURL=framework.js'})
187 .then(next);
188 },
189
170 function testAsyncDOMBreakpoint(next) { 190 function testAsyncDOMBreakpoint(next) {
171 schedulePauseOnNextStatement('', ''); 191 schedulePauseOnNextStatement('', '');
172 InspectorTest.log('> all frames in framework:'); 192 InspectorTest.log('> all frames in framework:');
173 Protocol.Runtime 193 Protocol.Runtime
174 .evaluate( 194 .evaluate(
175 {expression: 'asyncDOMBreakpoint()//# sourceURL=framework.js'}) 195 {expression: 'asyncDOMBreakpoint()//# sourceURL=framework.js'})
176 .then(() => cancelPauseOnNextStatement()) 196 .then(() => cancelPauseOnNextStatement())
177 .then( 197 .then(
178 () => Protocol.Runtime.evaluate( 198 () => Protocol.Runtime.evaluate(
179 {expression: '42//# sourceURL=user.js'})) 199 {expression: '42//# sourceURL=user.js'}))
(...skipping 25 matching lines...) Expand all
205 () => Protocol.Runtime.evaluate( 225 () => Protocol.Runtime.evaluate(
206 {expression: 'throwFromJSONParse()//# sourceURL=framework.js'})) 226 {expression: 'throwFromJSONParse()//# sourceURL=framework.js'}))
207 .then(() => InspectorTest.log('> mixed, top frame in framework:')) 227 .then(() => InspectorTest.log('> mixed, top frame in framework:'))
208 .then( 228 .then(
209 () => Protocol.Runtime.evaluate( 229 () => Protocol.Runtime.evaluate(
210 {expression: 'throwFromJSONParse()//# sourceURL=user.js'})) 230 {expression: 'throwFromJSONParse()//# sourceURL=user.js'}))
211 .then(() => Protocol.Debugger.setPauseOnExceptions({state: 'none'})) 231 .then(() => Protocol.Debugger.setPauseOnExceptions({state: 'none'}))
212 .then(next); 232 .then(next);
213 } 233 }
214 ]); 234 ]);
OLDNEW
« no previous file with comments | « src/debug/debug.h ('k') | test/inspector/debugger/framework-break-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698