browser_dbg-console.js (995B)
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 "use strict"; 6 7 add_task(async function () { 8 Services.prefs.setBoolPref("devtools.toolbox.splitconsole.open", true); 9 const dbg = await initDebugger( 10 "doc-script-switching.html", 11 "script-switching-01.js" 12 ); 13 14 await selectSource(dbg, "script-switching-01.js"); 15 16 info("Open the split console"); 17 await getDebuggerSplitConsole(dbg); 18 ok(dbg.toolbox.splitConsole, "Split console is shown."); 19 20 info("Click to focus on the debugger editor"); 21 await clickElement(dbg, "codeMirror"); 22 23 info("Press ESC to close the split console"); 24 pressKey(dbg, "Escape"); 25 ok(!dbg.toolbox.splitConsole, "Split console is hidden."); 26 27 info("Press the ESC again to open the split console again"); 28 pressKey(dbg, "Escape"); 29 ok(dbg.toolbox.splitConsole, "Split console is shown."); 30 });