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

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

Issue 2720813002: [wasm] Fix importing wasm functions which are being debugged (Closed)
Patch Set: Awesome inspector test now :) 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
« no previous file with comments | « test/inspector/debugger/wasm-imports-expected.txt ('k') | no next file » | 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 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) {
« no previous file with comments | « test/inspector/debugger/wasm-imports-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698