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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-over-caught-exception.js

Issue 2968523003: [DevTools] Migrate inspector-protocol/debugger tests to new harness (Closed)
Patch Set: all tests Created 3 years, 5 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
(Empty)
1 (async function(testRunner) {
2 let {page, session, dp} = await testRunner.startBlank('');
3
4 dp.Debugger.enable();
5 dp.Runtime.enable();
6 dp.Runtime.evaluate({expression: `
7
8
9
10
11
12 function testFunction() {
13 function foo() {
14 try {
15 throw new Error();
16 } catch (e) {
17 }
18 }
19 debugger;
20 foo();
21 console.log('completed');
22 }
23 setTimeout(testFunction, 0);
24 `});
25
26 function printCallFrames(messageObject) {
27 var callFrames = messageObject.params.callFrames;
28 for (var callFrame of callFrames)
29 testRunner.log(callFrame.functionName + ':' + callFrame.location.lineNumbe r);
30 }
31
32 printCallFrames(await dp.Debugger.oncePaused());
33 dp.Debugger.stepOver();
34 await dp.Debugger.oncePaused();
35 dp.Debugger.stepOver();
36 printCallFrames(await dp.Debugger.oncePaused());
37 dp.Debugger.resume();
38 await dp.Runtime.onceConsoleAPICalled(messageObject => messageObject.params.ar gs[0].value === 'completed');
39
40 dp.Runtime.evaluate({expression: 'setTimeout(testFunction, 0);'} );
41 printCallFrames(await dp.Debugger.oncePaused());
42 dp.Debugger.stepOver();
43 await dp.Debugger.oncePaused();
44 dp.Debugger.stepInto();
45 await dp.Debugger.oncePaused();
46 dp.Debugger.stepOver();
47 await dp.Debugger.oncePaused();
48 dp.Debugger.stepOver();
49 printCallFrames(await dp.Debugger.oncePaused());
50 dp.Debugger.resume();
51 await dp.Runtime.onceConsoleAPICalled(messageObject => messageObject.params.ar gs[0].value === 'completed');
52
53 testRunner.completeTest();
54 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698