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

Side by Side 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 the V8 project authors. All rights reserved. 1 // Copyright 2017 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 InspectorTest.log('Checks stepping with more then one context group.'); 5 InspectorTest.log('Checks stepping with more then one context group.');
6 6
7 (async function test() { 7 (async function test() {
8 InspectorTest.setupScriptMap(); 8 InspectorTest.setupScriptMap();
9 await Protocol.Debugger.enable(); 9 await Protocol.Debugger.enable();
10 let contextGroupId = utils.createContextGroup(); 10 let contextGroup = InspectorTest.createContextGroup();
11 await Protocol.Debugger.enable({}, contextGroupId); 11 let session = InspectorTest.createSession(contextGroup);
12 InspectorTest.setupScriptMap(session);
13 await session.Protocol.Debugger.enable({});
12 Protocol.Runtime.evaluate({expression: 'debugger'}); 14 Protocol.Runtime.evaluate({expression: 'debugger'});
13 Protocol.Runtime.evaluate({expression: 'setTimeout(() => { debugger }, 0)'}, c ontextGroupId); 15 session.Protocol.Runtime.evaluate({expression: 'setTimeout(() => { debugger }, 0)'});
14 Protocol.Runtime.evaluate({expression: 'setTimeout(() => 42, 0)'}); 16 Protocol.Runtime.evaluate({expression: 'setTimeout(() => 42, 0)'});
15 await waitPauseAndDumpLocation(); 17 await waitPauseAndDumpLocation(InspectorTest.session);
16 Protocol.Debugger.stepOver(); 18 Protocol.Debugger.stepOver();
17 await Protocol.Debugger.oncePaused(); 19 await Protocol.Debugger.oncePaused();
18 Protocol.Debugger.stepOver(); 20 Protocol.Debugger.stepOver();
19 await waitPauseAndDumpLocation(); 21 await waitPauseAndDumpLocation(InspectorTest.session);
20 await Protocol.Debugger.disable({}, contextGroupId); 22 await session.Protocol.Debugger.disable({});
21 await Protocol.Debugger.disable(); 23 await Protocol.Debugger.disable();
22 InspectorTest.completeTest(); 24 InspectorTest.completeTest();
23 })(); 25 })();
24 26
25 async function waitPauseAndDumpLocation() { 27 async function waitPauseAndDumpLocation(session) {
26 var message = await Protocol.Debugger.oncePaused(); 28 var message = await session.Protocol.Debugger.oncePaused();
27 InspectorTest.log('paused at:'); 29 InspectorTest.log('paused at:');
28 await InspectorTest.logSourceLocation(message.params.callFrames[0].location); 30 await InspectorTest.logSourceLocation(message.params.callFrames[0].location, s ession);
29 return message; 31 return message;
30 } 32 }
OLDNEW
« 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