Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/call-frame-functionLocation.js |
| diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/call-frame-functionLocation.js b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/call-frame-functionLocation.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f7f3db316693c73fd0fc3ffc5e1824c4e38c1629 |
| --- /dev/null |
| +++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/call-frame-functionLocation.js |
| @@ -0,0 +1,26 @@ |
| +(async function(testRunner) { |
| + let {page, session, dp} = await testRunner.startBlank(''); |
| + |
| + dp.Debugger.enable(); |
| + dp.Runtime.evaluate({expression: ` |
| + |
|
chenwilliam
2017/06/30 20:23:27
I'm guessing the empty lines is just to preserve l
|
| + |
| + |
| + |
| +function testFunction() |
| +{ |
| + var a = 2; |
| + debugger; |
| +} |
| +setTimeout(testFunction, 0); |
| + `}); |
| + |
| + var messageObject = await dp.Debugger.oncePaused(); |
| + testRunner.log(`Paused on 'debugger;'`); |
| + var topFrame = messageObject.params.callFrames[0]; |
| + topFrame.location.scriptId = '42'; |
| + topFrame.functionLocation.scriptId = '42'; |
| + testRunner.log('Top frame location: ' + JSON.stringify(topFrame.location)); |
| + testRunner.log('Top frame functionLocation: ' + JSON.stringify(topFrame.functionLocation)); |
| + testRunner.completeTest(); |
| +}) |