Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

/* Any copyright is dedicated to the Public Domain.
const TEST_URL = "data:text/html,test browsertoolbox host";
add_task(async function () {
const {
Toolbox,
const tab = await addTab(TEST_URL);
const options = { doc: document };
const toolbox = await gDevTools.showToolboxForTab(tab, {
hostType: Toolbox.HostType.BROWSERTOOLBOX,
hostOptions: options,
});
is(toolbox.topWindow, window, "Toolbox is included in browser.xhtml");
const iframe = document.querySelector(
".devtools-toolbox-browsertoolbox-iframe"
);
ok(iframe, "A toolbox iframe was created in the provided document");
is(toolbox.doc, iframe.contentDocument, "Toolbox is in the custom iframe");
await toolbox.destroy();
iframe.remove();
});