| Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-over-caught-exception.js
|
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-over-caught-exception.js b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-over-caught-exception.js
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a30526dc1c335d29e84834ae2636265bb8908431
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/step-over-caught-exception.js
|
| @@ -0,0 +1,54 @@
|
| +(async function(testRunner) {
|
| + let {page, session, dp} = await testRunner.startBlank('');
|
| +
|
| + dp.Debugger.enable();
|
| + dp.Runtime.enable();
|
| + dp.Runtime.evaluate({expression: `
|
| +
|
| +
|
| +
|
| +
|
| +
|
| + function testFunction() {
|
| + function foo() {
|
| + try {
|
| + throw new Error();
|
| + } catch (e) {
|
| + }
|
| + }
|
| + debugger;
|
| + foo();
|
| + console.log('completed');
|
| + }
|
| + setTimeout(testFunction, 0);
|
| + `});
|
| +
|
| + function printCallFrames(messageObject) {
|
| + var callFrames = messageObject.params.callFrames;
|
| + for (var callFrame of callFrames)
|
| + testRunner.log(callFrame.functionName + ':' + callFrame.location.lineNumber);
|
| + }
|
| +
|
| + printCallFrames(await dp.Debugger.oncePaused());
|
| + dp.Debugger.stepOver();
|
| + await dp.Debugger.oncePaused();
|
| + dp.Debugger.stepOver();
|
| + printCallFrames(await dp.Debugger.oncePaused());
|
| + dp.Debugger.resume();
|
| + await dp.Runtime.onceConsoleAPICalled(messageObject => messageObject.params.args[0].value === 'completed');
|
| +
|
| + dp.Runtime.evaluate({expression: 'setTimeout(testFunction, 0);'} );
|
| + printCallFrames(await dp.Debugger.oncePaused());
|
| + dp.Debugger.stepOver();
|
| + await dp.Debugger.oncePaused();
|
| + dp.Debugger.stepInto();
|
| + await dp.Debugger.oncePaused();
|
| + dp.Debugger.stepOver();
|
| + await dp.Debugger.oncePaused();
|
| + dp.Debugger.stepOver();
|
| + printCallFrames(await dp.Debugger.oncePaused());
|
| + dp.Debugger.resume();
|
| + await dp.Runtime.onceConsoleAPICalled(messageObject => messageObject.params.args[0].value === 'completed');
|
| +
|
| + testRunner.completeTest();
|
| +})
|
|
|