Source code
Revision control
Copy as Markdown
Other Tools
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
"use strict";
/* exported shutdownAccService */
// These tests need to control precisely when the accessibility service is
// created, so prevent common.js from instantiating it as a side effect of
// being loaded here.
window.gDisableAccServiceInit = true;
Services.scriptloader.loadSubScript(
this
);
loadScripts(
{ name: "common.js", dir: MOCHITESTS_DIR },
{ name: "events.js", dir: MOCHITESTS_DIR },
{ name: "role.js", dir: MOCHITESTS_DIR }
);
delete window.gDisableAccServiceInit;
const { CommonUtils } = ChromeUtils.importESModule(
);
async function shutdownAccService() {
if (!Services.appinfo.accessibilityEnabled) {
return;
}
CommonUtils.addAccServiceShutdownObserver();
gAccService = null;
forceGC();
await CommonUtils.observeAccServiceShutdown();
ok(!Services.appinfo.accessibilityEnabled, "a11y disabled");
}
registerCleanupFunction(shutdownAccService);