| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="../../../http/tests/inspector/resources/inspector-test.js"></script> |
| <script src="../resources/log-pause-location.js"></script> |
| <script> |
| function entry() { |
| pause(); |
| } |
| |
| function pause() { |
| var x; // BREAKPOINT |
| } |
| |
| // --------- |
| |
| function test() |
| { |
| let suite = InspectorTest.createAsyncSuite("Debugger.stepping.inner-to-outer"); |
| |
| window.initializeSteppingTestSuite(suite); |
| |
| addSteppingTestCase({ |
| name: "Debugger.stepping.inner-to-outer.StepIn", |
| description: "Should be able to leave an inner function via step-in and end up in the caller.", |
| expression: "setTimeout(entry)", |
| steps: [ |
| // breakpoint |
| "in", // leaving pause |
| "in", // leaving entry |
| "resume", |
| ] |
| }); |
| |
| addSteppingTestCase({ |
| name: "Debugger.stepping.inner-to-outer.StepOver", |
| description: "Should be able to leave an inner function via step-over and end up in the caller.", |
| expression: "setTimeout(entry)", |
| steps: [ |
| // breakpoint |
| "over", // leaving pause |
| "over", // leaving entry |
| "resume", |
| ] |
| }); |
| |
| addSteppingTestCase({ |
| name: "Debugger.stepping.inner-to-outer.StepOut", |
| description: "Should be able to leave an inner function via step-out and end up in the caller.", |
| expression: "setTimeout(entry)", |
| steps: [ |
| // breakpoint |
| "out", // out of pause, should end up in entry |
| "resume", |
| ] |
| }); |
| |
| loadMainPageContent().then(() => { |
| setBreakpointsOnLinesWithBreakpointComment().then(() => { |
| suite.runTestCasesAndFinish(); |
| }); |
| }); |
| } |
| </script> |
| </head> |
| <body onload="runTest()"> |
| <p>Checking pause locations when pausing inside a function and stepping through to the outer function.</p> |
| </body> |
| </html> |