| Index: test/inspector/debugger/command-line-api-with-bound-function.js
|
| diff --git a/test/inspector/debugger/command-line-api-with-bound-function.js b/test/inspector/debugger/command-line-api-with-bound-function.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a813074c28fe21f6b23937df9293e16818c0ce93
|
| --- /dev/null
|
| +++ b/test/inspector/debugger/command-line-api-with-bound-function.js
|
| @@ -0,0 +1,50 @@
|
| +// Copyright 2016 the V8 project authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +print("Check that debug and monitor methods from Command Line API works with bound function.");
|
| +
|
| +InspectorTest.addScript(`
|
| +function foo() {}
|
| +function boo() {}
|
| +var bar = boo.bind(null);
|
| +
|
| +function testFunction() {
|
| + debug(foo);
|
| + debug(bar);
|
| + foo();
|
| + bar();
|
| + undebug(foo);
|
| + undebug(bar);
|
| + foo();
|
| + bar();
|
| +
|
| + monitor(foo);
|
| + monitor(bar);
|
| + foo();
|
| + bar();
|
| + unmonitor(foo);
|
| + unmonitor(bar);
|
| + foo();
|
| + bar();
|
| +
|
| + monitor(bar);
|
| + debug(bar);
|
| + bar();
|
| + undebug(bar);
|
| + bar();
|
| + debug(bar);
|
| + unmonitor(bar);
|
| + bar();
|
| +}`);
|
| +
|
| +Protocol.Runtime.enable();
|
| +Protocol.Debugger.enable();
|
| +Protocol.Debugger.onPaused(message => {
|
| + var functionName = message.params.callFrames[0].functionName;
|
| + InspectorTest.log(`paused in ${functionName}`);
|
| + Protocol.Debugger.resume();
|
| +});
|
| +Protocol.Runtime.onConsoleAPICalled(message => InspectorTest.log(message.params.args[0].value));
|
| +Protocol.Runtime.evaluate({ expression: "testFunction()", includeCommandLineAPI: true })
|
| + .then(InspectorTest.completeTest);
|
|
|