diff options
Diffstat (limited to 'devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_devtoolstoolbox_target_destroyed.js')
-rw-r--r-- | devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_devtoolstoolbox_target_destroyed.js | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_devtoolstoolbox_target_destroyed.js b/devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_devtoolstoolbox_target_destroyed.js new file mode 100644 index 0000000000..d0001d1c03 --- /dev/null +++ b/devtools/client/aboutdebugging/test/browser/browser_aboutdebugging_devtoolstoolbox_target_destroyed.js @@ -0,0 +1,36 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Test that the expected supported categories are displayed for USB runtimes. +add_task(async function () { + const targetTab = await addTab("about:home"); + + const { document, tab, window } = await openAboutDebugging(); + + // go to This Firefox and inspect the new tab + info("Inspecting a new tab in This Firefox"); + await selectThisFirefoxPage(document, window.AboutDebugging.store); + const { devtoolsDocument, devtoolsTab, devtoolsWindow } = + await openAboutDevtoolsToolbox(document, tab, window, "about:home"); + const targetUrl = devtoolsDocument.querySelector(".devtools-textinput"); + ok( + targetUrl.value.includes("about:home"), + "about:devtools-toolbox is open for the target" + ); + + // close the inspected tab and check that error page is shown + info("removing the inspected tab"); + await removeTab(targetTab); + await waitUntil(() => + devtoolsWindow.document.querySelector(".qa-error-page") + ); + + info("closing the toolbox"); + await removeTab(devtoolsTab); + await waitUntil(() => !findDebugTargetByText("Toolbox -", document)); + + info("removing about:debugging tab"); + await removeTab(tab); +}); |