test_stepping-13.js (1116B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 /* 7 * Check that is possible to step into both the inner and outer function 8 * calls. 9 */ 10 11 add_task( 12 threadFrontTest(async ({ commands, threadFront }) => { 13 dumpn("Evaluating test code and waiting for first debugger statement"); 14 15 commands.scriptCommand.execute( 16 `(function () { 17 const a = () => { return 2 }; 18 debugger; 19 a(a()) 20 })()` 21 ); 22 23 await waitForEvent(threadFront, "paused"); 24 const step1 = await stepOver(threadFront); 25 Assert.equal(step1.frame.where.line, 4, "step to line 4"); 26 27 const step2 = await stepIn(threadFront); 28 Assert.equal(step2.frame.where.line, 2, "step in to line 2"); 29 30 const step3 = await stepOut(threadFront); 31 Assert.equal(step3.frame.where.line, 4, "step back to line 4"); 32 Assert.equal(step3.frame.where.column, 9, "step out to column 9"); 33 34 const step4 = await stepIn(threadFront); 35 Assert.equal(step4.frame.where.line, 2, "step in to line 2"); 36 37 await threadFront.resume(); 38 }) 39 );