Bug 1558805 - Fix test_inspector-inactive-property-helper.html beta permafail. r=jdescottes.

The inactive CSS feature is only enabled in Nightly at
the moment, which is what's causing the test to fail
on beta simulation.
Forcing the pref to true in the test should fix the issue.

Differential Revision: https://phabricator.services.mozilla.com/D34847

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Nicolas Chevobbe 2019-06-13 10:27:03 +00:00
parent 7f7c7c2ee3
commit 90335906a2

View File

@ -11,10 +11,17 @@ SimpleTest.waitForExplicitFinish();
(async function() {
const { require } = ChromeUtils.import("resource://devtools/shared/Loader.jsm");
const Services = require("Services");
const { inactivePropertyHelper } = require("devtools/server/actors/utils/inactive-property-helper");
let { isPropertyUsed } = inactivePropertyHelper;
isPropertyUsed = isPropertyUsed.bind(inactivePropertyHelper);
const INACTIVE_CSS_PREF = "devtools.inspector.inactive.css.enabled";
Services.prefs.setBoolPref(INACTIVE_CSS_PREF, true);
SimpleTest.registerCleanupFunction(() => {
Services.prefs.clearUserPref(INACTIVE_CSS_PREF);
});
const FOLDER = "./inactive-property-helper";
// Each file should `export default` an array of objects, representing each test case.