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

Unified Diff: test/inspector/debugger/get-possible-breakpoints-master.js

Issue 2728563002: [inspector] added type of break location into getPossibleBreakpoints output (Closed)
Patch Set: Created 3 years, 10 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/get-possible-breakpoints-master.js
diff --git a/test/inspector/debugger/get-possible-breakpoints-master.js b/test/inspector/debugger/get-possible-breakpoints-master.js
index 5926a89e7dac9bd23be9c3575cd87e970a4c39e1..e0b4e68df2b59a1d063745a6ebea3aea9a2bff38 100644
--- a/test/inspector/debugger/get-possible-breakpoints-master.js
+++ b/test/inspector/debugger/get-possible-breakpoints-master.js
@@ -20,15 +20,22 @@ function dumpAllLocations(message) {
}
var lines = source.split('\n');
var locations = message.result.locations.sort((loc1, loc2) => {
- if (loc2.lineNumber !== loc1.lineNumber) return loc2.lineNumber - loc1.lineNumber;
- return loc2.columnNumber - loc1.columnNumber;
+ if (loc2.location.lineNumber !== loc1.location.lineNumber) return loc2.location.lineNumber - loc1.location.lineNumber;
+ return loc2.location.columnNumber - loc1.location.columnNumber;
});
for (var location of locations) {
- var line = lines[location.lineNumber];
- line = line.slice(0, location.columnNumber) + '#' + line.slice(location.columnNumber);
- lines[location.lineNumber] = line;
+ var line = lines[location.location.lineNumber];
+ line = line.slice(0, location.location.columnNumber) + locationMark(location.type) + line.slice(location.location.columnNumber);
+ lines[location.location.lineNumber] = line;
}
lines = lines.filter(line => line.indexOf('//# sourceURL=') === -1);
InspectorTest.log(lines.join('\n'));
return message;
}
+
+function locationMark(type) {
+ if (type === 'return') return '|R|';
+ if (type === 'call') return '|C|';
+ if (type === 'debuggerStatement') return '|D|';
+ return '|_|';
+}

Powered by Google App Engine
This is Rietveld 408576698