browser_dbg-pretty-print-paused.js (986B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */ 4 5 // Tests pretty-printing a source that is currently paused. 6 7 "use strict"; 8 9 add_task(async function () { 10 const dbg = await initDebugger("doc-minified.html", "math.min.js"); 11 12 await selectSource(dbg, "math.min.js"); 13 await addBreakpoint(dbg, "math.min.js", 3); 14 15 invokeInTab("arithmetic"); 16 await waitForPaused(dbg, "math.min.js"); 17 await assertPausedAtSourceAndLine(dbg, findSource(dbg, "math.min.js").id, 3); 18 19 await togglePrettyPrint(dbg); 20 await waitForState( 21 dbg, 22 () => dbg.selectors.getSelectedFrame().location.line == 18 23 ); 24 await assertPausedAtSourceAndLine( 25 dbg, 26 findSource(dbg, "math.min.js:formatted").id, 27 18 28 ); 29 await waitForBreakpoint(dbg, "math.min.js:formatted", 18); 30 await assertBreakpoint(dbg, 18); 31 32 await resume(dbg); 33 });