browser_dbg-console-link.js (846B)
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 opening the console first, clicking a link 6 // opens the editor at the correct location. 7 8 "use strict"; 9 10 add_task(async function () { 11 const toolbox = await initPane("doc-script-switching.html", "webconsole"); 12 const linkEl = await waitForConsoleMessageLink( 13 toolbox, 14 "hi", 15 "script-switching-02.js:18:9" 16 ); 17 linkEl.click(); 18 19 await waitFor(() => toolbox.getPanel("jsdebugger")); 20 const dbg = createDebuggerContext(toolbox); 21 await waitForElement(dbg, "highlightLine"); 22 assertHighlightLocation(dbg, "script-switching-02.js", 18); 23 assertCursorPosition(dbg, 18, 9, "Cursor is set at the right location"); 24 });