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

Unified Diff: test/inspector/debugger/script-parsed-for-runtime-evaluate.js

Issue 2755863002: [Devtools] Add stacktrace to protocol for scriptParsed event (Closed)
Patch Set: [Devtools] Add stacktrace to protocol for scriptParsed event Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
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..b01fd8f9df3fbcaddbb24e61071f385cf73240c1 100644
--- a/test/inspector/debugger/script-parsed-for-runtime-evaluate.js
+++ b/test/inspector/debugger/script-parsed-for-runtime-evaluate.js
@@ -2,9 +2,19 @@
// 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);
+
Promise.prototype.thenLog = function log(message) {
return this.then(() => InspectorTest.log(message));
}
@@ -46,4 +56,9 @@ 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)
+
.then(InspectorTest.completeTest);

Powered by Google App Engine
This is Rietveld 408576698