Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
-
CI results over the last 22 days
- Manifest: devtools/client/framework/test/browser.toml
/* Any copyright is dedicated to the Public Domain.
"use strict";
// Test that the options panel disables checkboxes for locked prefs.
const PREF = "devtools.chrome.enabled";
add_task(async function () {
Services.prefs.lockPref(PREF);
registerCleanupFunction(() => Services.prefs.unlockPref(PREF));
const tab = await addTab("data:text/html,test");
const toolbox = await openToolboxForTab(tab, "options");
const panel = toolbox.getCurrentPanel();
const checkbox = panel.panelDoc.querySelector(`input[data-pref="${PREF}"]`);
ok(checkbox.disabled, "The checkbox of a locked pref is disabled");
const otherCheckbox = panel.panelDoc.querySelector(
`input[data-pref="devtools.debugger.remote-enabled"]`
);
ok(!otherCheckbox.disabled, "The checkbox of an unlocked pref is enabled");
});