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

Side by Side Diff: test/inspector/debugger/command-line-api-with-bound-function.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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("Check that debug and monitor methods from Command Line API wo rks with bound function."); 5 let {session, contextGroup, Protocol} = InspectorTest.start("Check that debug an d monitor methods from Command Line API works with bound function.");
6 6
7 InspectorTest.addScript(` 7 contextGroup.addScript(`
8 function foo() {} 8 function foo() {}
9 function boo() {} 9 function boo() {}
10 var bar = boo.bind(null); 10 var bar = boo.bind(null);
11 11
12 function testFunction() { 12 function testFunction() {
13 console.log("> debug foo and bar"); 13 console.log("> debug foo and bar");
14 debug(foo); 14 debug(foo);
15 debug(bar); 15 debug(bar);
16 console.log("> call foo and bar"); 16 console.log("> call foo and bar");
17 foo(); 17 foo();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 Protocol.Runtime.enable(); 55 Protocol.Runtime.enable();
56 Protocol.Debugger.enable(); 56 Protocol.Debugger.enable();
57 Protocol.Debugger.onPaused(message => { 57 Protocol.Debugger.onPaused(message => {
58 var functionName = message.params.callFrames[0].functionName; 58 var functionName = message.params.callFrames[0].functionName;
59 InspectorTest.log(`paused in ${functionName}`); 59 InspectorTest.log(`paused in ${functionName}`);
60 Protocol.Debugger.resume(); 60 Protocol.Debugger.resume();
61 }); 61 });
62 Protocol.Runtime.onConsoleAPICalled(message => InspectorTest.log(message.params. args[0].value)); 62 Protocol.Runtime.onConsoleAPICalled(message => InspectorTest.log(message.params. args[0].value));
63 Protocol.Runtime.evaluate({ expression: "testFunction()", includeCommandLineAPI: true }) 63 Protocol.Runtime.evaluate({ expression: "testFunction()", includeCommandLineAPI: true })
64 .then(InspectorTest.completeTest); 64 .then(InspectorTest.completeTest);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698