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

Side by Side Diff: test/inspector/runtime/client-console-api-message.js

Issue 2891213002: [inspector] Refactor protocol-test.js (Closed)
Patch Set: comments addressed Created 3 years, 7 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 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 })();
OLDNEW
« no previous file with comments | « test/inspector/runtime/clear-of-command-line-api-expected.txt ('k') | test/inspector/runtime/command-line-api.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698