browser_aboutdebugging_devtoolstoolbox_target_destroyed.js (1254B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // Test that the expected supported categories are displayed for USB runtimes. 7 add_task(async function () { 8 const targetTab = await addTab("about:home"); 9 10 const { document, tab, window } = await openAboutDebugging(); 11 12 // go to This Firefox and inspect the new tab 13 info("Inspecting a new tab in This Firefox"); 14 await selectThisFirefoxPage(document, window.AboutDebugging.store); 15 const { devtoolsDocument, devtoolsTab, devtoolsWindow } = 16 await openAboutDevtoolsToolbox(document, tab, window, "about:home"); 17 const targetUrl = devtoolsDocument.querySelector(".devtools-textinput"); 18 ok( 19 targetUrl.value.includes("about:home"), 20 "about:devtools-toolbox is open for the target" 21 ); 22 23 // close the inspected tab and check that error page is shown 24 info("removing the inspected tab"); 25 await removeTab(targetTab); 26 await waitUntil(() => 27 devtoolsWindow.document.querySelector(".qa-error-page") 28 ); 29 30 info("closing the toolbox"); 31 await removeTab(devtoolsTab); 32 await waitUntil(() => !findDebugTargetByText("Toolbox -", document)); 33 34 info("removing about:debugging tab"); 35 await removeTab(tab); 36 });