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

Unified Diff: test/inspector/protocol-test.js

Issue 2381693002: [inspector] added a test for crash in wrapping async evaluate result (Closed)
Patch Set: a Created 4 years, 2 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
« no previous file with comments | « no previous file | test/inspector/runtime/evaluate-async-with-wrap-error.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/protocol-test.js
diff --git a/test/inspector/protocol-test.js b/test/inspector/protocol-test.js
index 52fb4b1d263b76057fcfc25a30587a0c1ea7437c..44a679707f695305b7e9dfbe827473ad6e67fe20 100644
--- a/test/inspector/protocol-test.js
+++ b/test/inspector/protocol-test.js
@@ -133,6 +133,27 @@ InspectorTest.logObject = function(object, title)
InspectorTest.log(lines.join("\n"));
}
+InspectorTest.logMessage = function(message)
+{
+ if (message.id)
+ message.id = 0;
+
+ const nonStableFields = new Set(["objectId", "scriptId", "exceptionId"]);
+ var objects = [ message ];
+ while (objects.length) {
+ var object = objects.shift();
+ for (var key in object) {
+ if (nonStableFields.has(key))
+ object[key] = `<${key}>`;
+ else if (typeof object[key] === "object")
+ objects.push(object[key]);
+ }
+ }
+
+ InspectorTest.logObject(message);
+ return message;
+}
+
InspectorTest.completeTest = quit.bind(null);
InspectorTest.evaluateInPage = function(string, callback)
« no previous file with comments | « no previous file | test/inspector/runtime/evaluate-async-with-wrap-error.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698