Index: third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-doesnt-step-into-injected-script.js |
diff --git a/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-doesnt-step-into-injected-script.js b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-doesnt-step-into-injected-script.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..64fd2d38548706cbe81058af3baeff79aeda111f |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/inspector-protocol/debugger/debugger-doesnt-step-into-injected-script.js |
@@ -0,0 +1,38 @@ |
+(async function(testRunner) { |
+ let {page, session, dp} = await testRunner.startBlank('Check that stepInto at then end of the script go to next user script instead InjectedScriptSource.js.'); |
chenwilliam
2017/06/30 20:23:27
typo: s/then end/the end
|
+ |
+ function logStack(event) { |
+ testRunner.log('Stack trace:'); |
+ for (var callFrame of event.params.callFrames) |
+ testRunner.log(callFrame.functionName + ':' + callFrame.location.lineNumber + ':' + callFrame.location.columnNumber); |
+ testRunner.log(''); |
+ } |
+ |
+ dp.Debugger.enable(); |
+ await session.evaluate(` |
+ |
+ |
+ |
+ |
+ |
+ function foo() { |
+ return 239; |
+ }`); |
+ dp.Runtime.evaluate({expression: '(function boo() { setTimeout(foo, 0); debugger; })()' }); |
+ |
+ logStack(await dp.Debugger.oncePaused()); |
+ testRunner.log('Perform stepInto'); |
+ dp.Debugger.stepInto(); |
+ |
+ logStack(await dp.Debugger.oncePaused()); |
+ testRunner.log('Perform stepInto'); |
+ dp.Debugger.stepInto(); |
+ |
+ logStack(await dp.Debugger.oncePaused()); |
+ testRunner.log('Perform stepInto'); |
+ dp.Debugger.stepInto(); |
+ |
+ logStack(await dp.Debugger.oncePaused()); |
+ await dp.Debugger.resume(); |
+ testRunner.completeTest(); |
+}) |