Index: test/inspector/protocol-test.js |
diff --git a/test/inspector/protocol-test.js b/test/inspector/protocol-test.js |
index f88a66feec2f7acc5b77ca9338d6bb47602bf913..9a3526b1d34d9459c12d7dd5cd0960e14184d95b 100644 |
--- a/test/inspector/protocol-test.js |
+++ b/test/inspector/protocol-test.js |
@@ -138,9 +138,9 @@ InspectorTest.logCallFrames = function(callFrames) |
} |
} |
-InspectorTest.logCallFrameSourceLocation = function(callFrame) |
+InspectorTest.logSourceLocation = function(location) |
{ |
- var scriptId = callFrame.location.scriptId; |
+ var scriptId = location.scriptId; |
if (!InspectorTest._scriptMap || !InspectorTest._scriptMap.has(scriptId)) { |
InspectorTest.log("InspectorTest.setupScriptMap should be called before Protocol.Debugger.enable."); |
InspectorTest.completeTest(); |
@@ -154,7 +154,6 @@ InspectorTest.logCallFrameSourceLocation = function(callFrame) |
return Promise.resolve().then(dumpSourceWithLocation); |
function dumpSourceWithLocation() { |
- var location = callFrame.location; |
var lines = script.scriptSource.split('\n'); |
var line = lines[location.lineNumber]; |
line = line.slice(0, location.columnNumber) + '#' + (line.slice(location.columnNumber) || ''); |
@@ -164,6 +163,12 @@ InspectorTest.logCallFrameSourceLocation = function(callFrame) |
} |
} |
+InspectorTest.logSourceLocations = function(locations) { |
+ if (locations.length == 0) return Promise.resolve(); |
kozy
2017/03/02 21:31:10
We recently allow async-await syntax in tests, so:
|
+ return InspectorTest.logSourceLocation(locations[0]) |
+ .then(() => InspectorTest.logSourceLocations(locations.splice(1))); |
+} |
+ |
InspectorTest.logAsyncStackTrace = function(asyncStackTrace) |
{ |
while (asyncStackTrace) { |