Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
-
CI results over the last 21 days
- Manifest: devtools/client/settings/test/browser/browser.toml
/* Any copyright is dedicated to the Public Domain.
"use strict";
add_task(test_tool_setting_toggles_registration);
async function test_tool_setting_toggles_registration() {
Services.fog.testResetFOG();
await pushPref("devtools.styleeditor.enabled", true);
const { toolbox, root } = await openSettings();
const checkbox = root.shadowRoot.querySelector("#settings-tool-styleeditor");
await checkbox.closest("devtools-settings-pref").updateComplete;
await checkbox.updateComplete;
ok(
toolbox.doc.querySelector("#toolbox-tab-styleeditor"),
"The Style Editor tab starts visible"
);
checkbox.click();
await waitFor(
() => !toolbox.doc.querySelector("#toolbox-tab-styleeditor"),
"Clicking removes the Style Editor tab"
);
is(
Glean.devtoolsTool.registered.styleeditor.testGetValue(),
false,
"Clicking records the tool as unregistered"
);
checkbox.click();
await waitFor(
() => toolbox.doc.querySelector("#toolbox-tab-styleeditor"),
"Clicking again restores the Style Editor tab"
);
is(
Glean.devtoolsTool.registered.styleeditor.testGetValue(),
true,
"Clicking again records the tool as registered"
);
await toolbox.destroy();
}