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 InspectorTest.log('Checks that we passed correct arguments in ' + | 5 let {session, contextGroup, Protocol} = InspectorTest.start('Checks that we pass
ed correct arguments in ' + |
6 'V8InspectorClient::consoleAPIMessage. Note: lines and columns are 1-based.'); | 6 'V8InspectorClient::consoleAPIMessage. Note: lines and columns are 1-based.'); |
7 | 7 |
8 InspectorTest.addScript(` | 8 contextGroup.addScript(` |
9 function consoleTrace() { | 9 function consoleTrace() { |
10 function a() { | 10 function a() { |
11 function b() { | 11 function b() { |
12 console.trace(239); | 12 console.trace(239); |
13 } | 13 } |
14 b(); | 14 b(); |
15 } | 15 } |
16 a(); | 16 a(); |
17 } | 17 } |
18 `, 8, 26); | 18 `, 8, 26); |
19 | 19 |
20 Protocol.Runtime.enable(); | 20 Protocol.Runtime.enable(); |
21 utils.setLogConsoleApiMessageCalls(true); | 21 utils.setLogConsoleApiMessageCalls(true); |
22 (async function test() { | 22 (async function test() { |
23 Protocol.Runtime.evaluate({expression: 'console.log(42)'}); | 23 Protocol.Runtime.evaluate({expression: 'console.log(42)'}); |
24 await Protocol.Runtime.onceConsoleAPICalled() | 24 await Protocol.Runtime.onceConsoleAPICalled() |
25 Protocol.Runtime.evaluate({expression: 'consoleTrace()'}); | 25 Protocol.Runtime.evaluate({expression: 'consoleTrace()'}); |
26 await Protocol.Runtime.onceConsoleAPICalled() | 26 await Protocol.Runtime.onceConsoleAPICalled() |
27 InspectorTest.completeTest(); | 27 InspectorTest.completeTest(); |
28 })(); | 28 })(); |
OLD | NEW |