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

Unified Diff: test/inspector/debugger/wasm-imports.js

Issue 2891213002: [inspector] Refactor protocol-test.js (Closed)
Patch Set: comments addressed Created 3 years, 7 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/wasm-imports.js
diff --git a/test/inspector/debugger/wasm-imports.js b/test/inspector/debugger/wasm-imports.js
index e2a87867e329b2e5363d99de9cf44289d8f87a35..dbe96ce6718bbeb8bff9a0f58c912354e8a0bdde 100644
--- a/test/inspector/debugger/wasm-imports.js
+++ b/test/inspector/debugger/wasm-imports.js
@@ -2,6 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+let {session, contextGroup, Protocol} = InspectorTest.start('Tests imports in wasm');
+
utils.load('test/mjsunit/wasm/wasm-constants.js');
utils.load('test/mjsunit/wasm/wasm-module-builder.js');
@@ -39,7 +41,7 @@ function instantiate(bytes, imp) {
var evalWithUrl = (code, url) => Protocol.Runtime.evaluate(
{'expression': code + '\n//# sourceURL=v8://test/' + url});
-InspectorTest.setupScriptMap();
+session.setupScriptMap();
// Main promise chain:
Protocol.Debugger.enable()
@@ -61,7 +63,7 @@ Protocol.Debugger.enable()
url =>
Protocol.Debugger.setBreakpointByUrl({lineNumber: 1, url: url}))
.then(printFailure)
- .then(msg => InspectorTest.logSourceLocations(msg.result.locations))
+ .then(msg => session.logSourceLocations(msg.result.locations))
.then(() => InspectorTest.log('Calling instantiate function for module B.'))
.then(
() =>
@@ -84,7 +86,7 @@ Protocol.Debugger.oncePaused()
(InspectorTest.log(
'Paused at ' + loc.lineNumber + ':' + loc.columnNumber + '.'),
loc))
- .then(InspectorTest.logSourceLocation)
+ .then(session.logSourceLocation.bind(session))
.then(
() => InspectorTest.log(
'Getting current stack trace via "new Error().stack".'))
« no previous file with comments | « test/inspector/debugger/wasm-get-breakable-locations-expected.txt ('k') | test/inspector/debugger/wasm-imports-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698