diff --git a/devtools/client/debugger/test/mochitest/browser_dbg_split-console-keypress.js b/devtools/client/debugger/test/mochitest/browser_dbg_split-console-keypress.js index 29d971d4c683..d691be120317 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg_split-console-keypress.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg_split-console-keypress.js @@ -64,7 +64,8 @@ function test() { // (Must happen after generateMouseClickInTab() call) let consoleLostFocus = false; jsterm.focus(); - jsterm.inputNode.addEventListener("blur", () => {consoleLostFocus = true;}); + const node = jsterm.inputNode || jsterm.node; + node.addEventListener("blur", () => {consoleLostFocus = true;}); is(gThreadClient.paused, true, "Should be paused at debugger statement."); diff --git a/devtools/client/framework/test/browser_toolbox_split_console.js b/devtools/client/framework/test/browser_toolbox_split_console.js index 63c469fd747e..fa40ba1268d0 100644 --- a/devtools/client/framework/test/browser_toolbox_split_console.js +++ b/devtools/client/framework/test/browser_toolbox_split_console.js @@ -52,8 +52,7 @@ function testUseKeyWithSplitConsole() { }, "jsdebugger"); info("synthesizeKey with the console focused"); - const consoleInput = gToolbox.getPanel("webconsole").hud.jsterm.inputNode; - consoleInput.focus(); + focusConsoleInput(); synthesizeKeyShortcut("F3", panelWin); ok(commandCalled, "Shortcut key should trigger the command"); @@ -69,8 +68,7 @@ function testUseKeyWithSplitConsoleWrongTool() { }, "inspector"); info("synthesizeKey with the console focused"); - const consoleInput = gToolbox.getPanel("webconsole").hud.jsterm.inputNode; - consoleInput.focus(); + focusConsoleInput(); synthesizeKeyShortcut("F4", panelWin); ok(!commandCalled, "Shortcut key shouldn't trigger the command"); @@ -81,3 +79,7 @@ async function cleanup() { gBrowser.removeCurrentTab(); gToolbox = panelWin = null; } + +function focusConsoleInput() { + gToolbox.getPanel("webconsole").hud.jsterm.focus(); +} diff --git a/devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js b/devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js index 46a36a6b6d00..19a41db4acd0 100644 --- a/devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js +++ b/devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js @@ -28,8 +28,7 @@ add_task(async function() { const hud = toolbox.getPanel("webconsole").hud; const jsterm = hud.jsterm; - const jstermInput = jsterm.hud.document.querySelector(".jsterm-input-node"); - is(jstermInput.value, "temp0", "first console variable is named temp0"); + is(jsterm.getInputValue(), "temp0", "first console variable is named temp0"); let result = await jsterm.execute(); isnot(result.textContent.indexOf('

'), -1, @@ -39,7 +38,7 @@ add_task(async function() { menuItem.click(); await inspector.once("console-var-ready"); - is(jstermInput.value, "temp1", "second console variable is named temp1"); + is(jsterm.getInputValue(), "temp1", "second console variable is named temp1"); result = await jsterm.execute(); isnot(result.textContent.indexOf('

'), -1, diff --git a/devtools/client/webconsole/test/mochitest/browser_webconsole_split.js b/devtools/client/webconsole/test/mochitest/browser_webconsole_split.js index 8bfe6a6e338e..bbd67118392e 100644 --- a/devtools/client/webconsole/test/mochitest/browser_webconsole_split.js +++ b/devtools/client/webconsole/test/mochitest/browser_webconsole_split.js @@ -25,7 +25,6 @@ add_task(async function() { async function performTests() { let toolbox; - await pushPref("devtools.webconsole.jsterm.codeMirror", true); await addTab(TEST_URI); await testConsoleLoadOnDifferentPanel(); await testKeyboardShortcuts();