mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-13 20:14:57 -10:00
34 lines
889 B
JavaScript
34 lines
889 B
JavaScript
/* Any copyright is dedicated to the Public Domain.
|
|
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
|
|
|
"use strict";
|
|
|
|
requestLongerTimeout(5);
|
|
|
|
async function performChecks(tab) {
|
|
let toolbox;
|
|
const toolIds = await getSupportedToolIds(tab);
|
|
for (const toolId of toolIds) {
|
|
info("About to open " + toolId);
|
|
toolbox = await gDevTools.showToolboxForTab(tab, { toolId });
|
|
ok(toolbox, "toolbox exists for " + toolId);
|
|
is(toolbox.currentToolId, toolId, "currentToolId should be " + toolId);
|
|
|
|
const panel = toolbox.getCurrentPanel();
|
|
ok(panel, toolId + " panel has been registered in the toolbox");
|
|
}
|
|
|
|
await toolbox.destroy();
|
|
}
|
|
|
|
function test() {
|
|
(async function () {
|
|
toggleAllTools(true);
|
|
const tab = await addTab("about:blank");
|
|
await performChecks(tab);
|
|
gBrowser.removeCurrentTab();
|
|
toggleAllTools(false);
|
|
finish();
|
|
})();
|
|
}
|