| 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 | 4 |
| 5 // TODO(kozyatinskiy): fix this test. | 5 // TODO(kozyatinskiy): fix this test. |
| 6 InspectorTest.log('Checks created frame for async call chain'); | 6 let {session, contextGroup, Protocol} = InspectorTest.start('Checks created fram
e for async call chain'); |
| 7 | 7 |
| 8 InspectorTest.addScript( | 8 contextGroup.addScript( |
| 9 ` | 9 ` |
| 10 function foo1() { | 10 function foo1() { |
| 11 debugger; | 11 debugger; |
| 12 } | 12 } |
| 13 | 13 |
| 14 function foo2() { | 14 function foo2() { |
| 15 debugger; | 15 debugger; |
| 16 } | 16 } |
| 17 | 17 |
| 18 function promise() { | 18 function promise() { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 var p = new Promise(r => resolve = r); | 70 var p = new Promise(r => resolve = r); |
| 71 setTimeout(() => | 71 setTimeout(() => |
| 72 setTimeout(() => | 72 setTimeout(() => |
| 73 setTimeout(() => { foo1(); resolve(); }, 0), 0), 0); | 73 setTimeout(() => { foo1(); resolve(); }, 0), 0), 0); |
| 74 return p; | 74 return p; |
| 75 } | 75 } |
| 76 | 76 |
| 77 //# sourceURL=test.js`, | 77 //# sourceURL=test.js`, |
| 78 8, 4); | 78 8, 4); |
| 79 | 79 |
| 80 InspectorTest.setupScriptMap(); | 80 session.setupScriptMap(); |
| 81 Protocol.Debugger.onPaused(message => { | 81 Protocol.Debugger.onPaused(message => { |
| 82 InspectorTest.logCallFrames(message.params.callFrames); | 82 session.logCallFrames(message.params.callFrames); |
| 83 InspectorTest.logAsyncStackTrace(message.params.asyncStackTrace); | 83 session.logAsyncStackTrace(message.params.asyncStackTrace); |
| 84 InspectorTest.log(''); | 84 InspectorTest.log(''); |
| 85 Protocol.Debugger.resume(); | 85 Protocol.Debugger.resume(); |
| 86 }); | 86 }); |
| 87 | 87 |
| 88 Protocol.Debugger.enable(); | 88 Protocol.Debugger.enable(); |
| 89 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128}); | 89 Protocol.Debugger.setAsyncCallStackDepth({maxDepth: 128}); |
| 90 | 90 |
| 91 InspectorTest.runTestSuite([ | 91 InspectorTest.runTestSuite([ |
| 92 function testPromise(next) { | 92 function testPromise(next) { |
| 93 Protocol.Runtime | 93 Protocol.Runtime |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 | 170 |
| 171 function testSetTimeouts(next) { | 171 function testSetTimeouts(next) { |
| 172 Protocol.Runtime | 172 Protocol.Runtime |
| 173 .evaluate({ | 173 .evaluate({ |
| 174 expression: 'setTimeouts()//# sourceURL=expr.js', | 174 expression: 'setTimeouts()//# sourceURL=expr.js', |
| 175 awaitPromise: true | 175 awaitPromise: true |
| 176 }) | 176 }) |
| 177 .then(next); | 177 .then(next); |
| 178 } | 178 } |
| 179 ]); | 179 ]); |
| OLD | NEW |