blob: 306e4598af63421f484c58294a1bdbab87e1fd38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* 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();
})();
}
|