const stopTracer = function() { try { observers.remove("http-on-modify-request", onRequestStart); observers.remove("http-on-examine-response", onRequestResponse); observers.remove("http-on-examine-cached-response", onRequestResponse); } catch(e) { console.exception(e); } //FIXME: remove progressListeners // note: WeakMap is not enumerable :-/ browserMap = new WeakMap(); };
AddonInstaller.uninstall(id).then(function() { let expectedEvents = ["shutdown", "uninstall"]; assert.equal(JSON.stringify(events), JSON.stringify(expectedEvents), prefix + "addon's bootstrap.js functions have been called"); observers.remove("addon-install-unit-test", eventsObserver); done(); });
AddonInstaller.uninstall(id).then(function () { // Ensure that bootstrap.js methods of the addon have been called // successfully and in the right order let expectedEvents = ["install", "startup", "shutdown", "uninstall"]; assert.equal(JSON.stringify(events), JSON.stringify(expectedEvents), "addon's bootstrap.js functions have been called"); observers.remove("addon-install-unit-test", eventsObserver); done(); });
function onFailure(code) { assert.fail("Install failed: "+code); observers.remove("addon-install-unit-test", eventsObserver); done(); }
function onFailure(code) { assert.fail("Install failed: "+code); observers.remove("test-selfdestruct", eventsObserver); done(); }