From 8c8aec2bf947148e24e473bee69948022a70d44e Mon Sep 17 00:00:00 2001 From: Jono X Date: Mon, 11 Apr 2011 22:30:44 -0400 Subject: [PATCH] Bug 577694 - Add detection of accessibility instantiation [r=mark.finkle] --- .../testpilot@labs.mozilla.com/modules/metadata.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/metadata.js b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/metadata.js index e7120c5ce79..f380cced905 100644 --- a/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/metadata.js +++ b/browser/app/profile/extensions/testpilot@labs.mozilla.com/modules/metadata.js @@ -117,6 +117,19 @@ let MetadataCollector = { accessibilities.push({ name: prefName, value: prefValue }); } + /* Detect accessibility instantiation + * (David Bolter's code from bug 577694) */ + let enabled; + try { + enabled = Components.manager.QueryInterface(Ci.nsIServiceManager) + .isServiceInstantiatedByContractID( + "@mozilla.org/accessibilityService;1", + Ci.nsISupports); + } catch (ex) { + enabled = false; + } + accessibilities.push({name: "isInstantiated", value: enabled}); + return accessibilities; },