head.js (940B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 /* eslint no-unused-vars: [2, {"vars": "local"}] */ 5 6 "use strict"; 7 8 var { require } = ChromeUtils.importESModule( 9 "resource://devtools/shared/loader/Loader.sys.mjs" 10 ); 11 var { BrowserLoader } = ChromeUtils.importESModule( 12 "resource://devtools/shared/loader/browser-loader.sys.mjs" 13 ); 14 var DevToolsUtils = require("resource://devtools/shared/DevToolsUtils.js"); 15 16 var { require: browserRequire } = BrowserLoader({ 17 baseURI: "resource://devtools/client/shared/", 18 window, 19 }); 20 21 window.EVENTS = {}; 22 window.on = function () {}; 23 window.off = function () {}; 24 25 SimpleTest.registerCleanupFunction(() => { 26 window.EVENTS = null; 27 window.on = null; 28 window.off = null; 29 }); 30 31 // All tests are asynchronous. 32 SimpleTest.waitForExplicitFinish();