| Index: test/inspector/debugger/script-parsed-for-runtime-evaluate.js
|
| diff --git a/test/inspector/debugger/script-parsed-for-runtime-evaluate.js b/test/inspector/debugger/script-parsed-for-runtime-evaluate.js
|
| index be62089d7ada28f32ff708dc41062acab4873fb6..300821baa32dedff320544e5812bc19290a622ca 100644
|
| --- a/test/inspector/debugger/script-parsed-for-runtime-evaluate.js
|
| +++ b/test/inspector/debugger/script-parsed-for-runtime-evaluate.js
|
| @@ -2,9 +2,29 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -InspectorTest.log("Checks that inspector reports script compiled in Runtime.evaluate," +
|
| +InspectorTest.log("Checks that inspector reports script compiled in Runtime.evaluate, " +
|
| "Runtime.callFunctionOn and Runtime.compileScript");
|
|
|
| +InspectorTest.addScript(`
|
| +function fooTop() {
|
| + eval(\`
|
| + function foo() {
|
| + eval("({})")
|
| + }
|
| + foo() //# sourceURL=second-frame.js\`);
|
| +}
|
| +//# sourceURL=top-frame.js`, 8, 26);
|
| +
|
| +InspectorTest.addScript(`
|
| +function fooTopFail() {
|
| + eval(\`
|
| + function fooFail() {
|
| + eval("({}")
|
| + }
|
| + fooFail() //# sourceURL=second-frame-fail.js\`);
|
| +}
|
| +//# sourceURL=top-frame-fail.js`, 18, 26);
|
| +
|
| Promise.prototype.thenLog = function log(message) {
|
| return this.then(() => InspectorTest.log(message));
|
| }
|
| @@ -46,4 +66,14 @@ Protocol.Debugger.enable()
|
| .then(() => Protocol.Runtime.compileScript({ expression: "}",
|
| sourceURL: "compile-script-syntax-error.js", persistScript: false }))
|
|
|
| + .thenLog('Runtime.evaluate compiled script with stack trace')
|
| + .then(() => Protocol.Runtime.evaluate({
|
| + expression: "fooTop()"}))
|
| + .then(msg => objectId = msg.result.result.objectId)
|
| +
|
| + .thenLog('Runtime.evaluate compile script error with stack trace')
|
| + .then(() => Protocol.Runtime.evaluate({
|
| + expression: "fooTopFail()"}))
|
| + .then(msg => objectId = msg.result.result.objectId)
|
| +
|
| .then(InspectorTest.completeTest);
|
|
|