head.js (810B)
1 "use strict"; 2 3 ChromeUtils.defineESModuleGetters(this, { 4 AddonTestUtils: "resource://testing-common/AddonTestUtils.sys.mjs", 5 ExtensionTestUtils: 6 "resource://testing-common/ExtensionXPCShellUtils.sys.mjs", 7 }); 8 9 // Remove this pref once bug 1535365 is fixed. 10 Services.prefs.setBoolPref("extensions.webextensions.remote", false); 11 12 // https_first automatically upgrades http to https, but the tests are not 13 // designed to expect that. And it is not easy to change that because 14 // nsHttpServer does not support https (bug 1742061). So disable https_first. 15 Services.prefs.setBoolPref("dom.security.https_first", false); 16 17 ExtensionTestUtils.init(this); 18 19 Services.io.offline = true; 20 21 var createHttpServer = (...args) => { 22 AddonTestUtils.maybeInit(this); 23 return AddonTestUtils.createHttpServer(...args); 24 };