diff options
Diffstat (limited to 'devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_process_main_local.js')
-rw-r--r-- | devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_process_main_local.js | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_process_main_local.js b/devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_process_main_local.js new file mode 100644 index 0000000000..06bd29095c --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_process_main_local.js @@ -0,0 +1,44 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +/* import-globals-from helper-collapsibilities.js */ +Services.scriptloader.loadSubScript( + CHROME_URL_ROOT + "helper-collapsibilities.js", + this +); + +// Test for main process against This Firefox. +// +// The main added value for this test is to check that listing processes +// and opening a toolbox targeting a process works, even though debugging +// the main process of This Firefox is not really supported. +add_task(async function () { + await pushPref("devtools.aboutdebugging.process-debugging", true); + await pushPref("devtools.aboutdebugging.test-local-process-debugging", true); + + const { document, tab, window } = await openAboutDebugging(); + await selectThisFirefoxPage(document, window.AboutDebugging.store); + + info("Check debug target item of the main process"); + const mainProcessItem = findDebugTargetByText("Multiprocess", document); + ok(mainProcessItem, "Debug target item of the main process should display"); + ok( + mainProcessItem.textContent.includes( + "Main Process and Content Processes for the target browser" + ), + "Debug target item of the main process should contains the description" + ); + + info("Inspect main process and wait for DevTools to open"); + const { devtoolsTab } = await openAboutDevtoolsToolbox( + document, + tab, + window, + "Main Process" + ); + + await closeAboutDevtoolsToolbox(document, devtoolsTab, window); + await removeTab(tab); +}); |