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

Unified Diff: test/inspector/debugger/step-over-another-context-group.js

Issue 2890463004: [inspector] Refactor inspector test (Closed)
Patch Set: better crash fix 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
« no previous file with comments | « test/inspector/debugger/pause.js ('k') | test/inspector/debugger/stepping-ignores-injected-script.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/inspector/debugger/step-over-another-context-group.js
diff --git a/test/inspector/debugger/step-over-another-context-group.js b/test/inspector/debugger/step-over-another-context-group.js
index c860ef9f46142d30a789670a4b9cb18805599d3e..d262b4a758b2c08cded9b2b1ccc50b9589459779 100644
--- a/test/inspector/debugger/step-over-another-context-group.js
+++ b/test/inspector/debugger/step-over-another-context-group.js
@@ -7,24 +7,26 @@ InspectorTest.log('Checks stepping with more then one context group.');
(async function test() {
InspectorTest.setupScriptMap();
await Protocol.Debugger.enable();
- let contextGroupId = utils.createContextGroup();
- await Protocol.Debugger.enable({}, contextGroupId);
+ let contextGroup = InspectorTest.createContextGroup();
+ let session = InspectorTest.createSession(contextGroup);
+ InspectorTest.setupScriptMap(session);
+ await session.Protocol.Debugger.enable({});
Protocol.Runtime.evaluate({expression: 'debugger'});
- Protocol.Runtime.evaluate({expression: 'setTimeout(() => { debugger }, 0)'}, contextGroupId);
+ session.Protocol.Runtime.evaluate({expression: 'setTimeout(() => { debugger }, 0)'});
Protocol.Runtime.evaluate({expression: 'setTimeout(() => 42, 0)'});
- await waitPauseAndDumpLocation();
+ await waitPauseAndDumpLocation(InspectorTest.session);
Protocol.Debugger.stepOver();
await Protocol.Debugger.oncePaused();
Protocol.Debugger.stepOver();
- await waitPauseAndDumpLocation();
- await Protocol.Debugger.disable({}, contextGroupId);
+ await waitPauseAndDumpLocation(InspectorTest.session);
+ await session.Protocol.Debugger.disable({});
await Protocol.Debugger.disable();
InspectorTest.completeTest();
})();
-async function waitPauseAndDumpLocation() {
- var message = await Protocol.Debugger.oncePaused();
+async function waitPauseAndDumpLocation(session) {
+ var message = await session.Protocol.Debugger.oncePaused();
InspectorTest.log('paused at:');
- await InspectorTest.logSourceLocation(message.params.callFrames[0].location);
+ await InspectorTest.logSourceLocation(message.params.callFrames[0].location, session);
return message;
}
« no previous file with comments | « test/inspector/debugger/pause.js ('k') | test/inspector/debugger/stepping-ignores-injected-script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698