diff options
Diffstat (limited to 'devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js')
-rw-r--r-- | devtools/client/inspector/test/browser_inspector_menu-04-use-in-console.js | 20 |
1 files changed, 17 insertions, 3 deletions
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 ac6ae35ad1..bd655a9a96 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 @@ -11,9 +11,17 @@ add_task(async function () { // requests to evaluateJSAsync. await pushPref("devtools.webconsole.input.eagerEvaluation", false); - const { inspector, toolbox } = await openInspectorForURL(TEST_URL); + info("Testing 'Use in Console' menu item with enabled split console."); + await pushPref("devtools.toolbox.splitconsole.enabled", true); + await testConsoleFunctionality({ isSplitConsoleEnabled: true }); + + info("Testing 'Use in Console' menu item with disabled split console."); + await pushPref("devtools.toolbox.splitconsole.enabled", false); + await testConsoleFunctionality({ isSplitConsoleEnabled: false }); +}); - info("Testing 'Use in Console' menu item."); +async function testConsoleFunctionality({ isSplitConsoleEnabled }) { + const { inspector, toolbox } = await openInspectorForURL(TEST_URL); await selectNode("#console-var", inspector); const container = await getContainerForSelector("#console-var", inspector); @@ -27,6 +35,12 @@ add_task(async function () { const hud = toolbox.getPanel("webconsole").hud; + if (isSplitConsoleEnabled) { + ok(toolbox.splitConsole, "The console is split console."); + } else { + ok(!toolbox.splitConsole, "The console is Web Console tab."); + } + const getConsoleResults = () => hud.ui.outputNode.querySelectorAll(".result"); is(hud.getInputValue(), "temp0", "first console variable is named temp0"); @@ -54,4 +68,4 @@ add_task(async function () { ); hud.ui.wrapper.dispatchClearHistory(); -}); +} |