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

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

Issue 2465553003: [inspector] added Debugger.getPossibleBreakpoints method (Closed)
Patch Set: addressed comments Created 4 years, 1 month 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 | « test/inspector/inspector-test.cc ('k') | test/inspector/task-runner.h » ('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 86d4e3b49bc798a0f05b3548d45eab24358e5c29..9e18065201d6bf89aafd4c4244e5139d6fd1575a 100644
--- a/test/inspector/protocol-test.js
+++ b/test/inspector/protocol-test.js
@@ -31,12 +31,13 @@ Protocol = new Proxy({}, {
InspectorTest.log = print.bind(null);
-InspectorTest.logMessage = function(message)
+InspectorTest.logMessage = function(originalMessage)
{
+ var message = JSON.parse(JSON.stringify(originalMessage));
if (message.id)
message.id = "<messageId>";
- const nonStableFields = new Set(["objectId", "scriptId", "exceptionId", "timestamp", "executionContextId", "callFrameId"]);
+ const nonStableFields = new Set(["objectId", "scriptId", "exceptionId", "timestamp", "executionContextId", "callFrameId", "breakpointId"]);
var objects = [ message ];
while (objects.length) {
var object = objects.shift();
@@ -49,7 +50,7 @@ InspectorTest.logMessage = function(message)
}
InspectorTest.logObject(message);
- return message;
+ return originalMessage;
}
InspectorTest.logObject = function(object, title)
@@ -112,18 +113,7 @@ InspectorTest.completeTestAfterPendingTimeouts = function()
awaitPromise: true }).then(InspectorTest.completeTest);
}
-InspectorTest.addScript = function(string)
-{
- return InspectorTest._sendCommandPromise("Runtime.evaluate", { "expression": string }).then(dumpErrorIfNeeded);
-
- function dumpErrorIfNeeded(message)
- {
- if (message.error) {
- InspectorTest.log("Error while executing '" + string + "': " + message.error.message);
- InspectorTest.completeTest();
- }
- }
-};
+InspectorTest.addScript = (string) => compileAndRunWithOrigin(string, "", 0, 0);
InspectorTest.startDumpingProtocolMessages = function()
{
« no previous file with comments | « test/inspector/inspector-test.cc ('k') | test/inspector/task-runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698