diff options
Diffstat (limited to 'toolkit/mozapps/extensions/test/xpcshell/test_shutdown.js')
-rw-r--r-- | toolkit/mozapps/extensions/test/xpcshell/test_shutdown.js | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/toolkit/mozapps/extensions/test/xpcshell/test_shutdown.js b/toolkit/mozapps/extensions/test/xpcshell/test_shutdown.js index 725887bc1..a865824f0 100644 --- a/toolkit/mozapps/extensions/test/xpcshell/test_shutdown.js +++ b/toolkit/mozapps/extensions/test/xpcshell/test_shutdown.js @@ -4,15 +4,12 @@ // Verify that API functions fail if the Add-ons Manager isn't initialised. -const IGNORE = ["getPreferredIconURL", "escapeAddonURI", - "shouldAutoUpdate", "getStartupChanges", +const IGNORE = ["escapeAddonURI", "shouldAutoUpdate", "getStartupChanges", "addTypeListener", "removeTypeListener", "addAddonListener", "removeAddonListener", "addInstallListener", "removeInstallListener", "addManagerListener", "removeManagerListener", - "mapURIToAddonID", "shutdown", "init", - "stateToString", "errorToString", "getUpgradeListener", - "addUpgradeListener", "removeUpgradeListener"]; + "mapURIToAddonID", "shutdown"]; const IGNORE_PRIVATE = ["AddonAuthor", "AddonCompatibilityOverride", "AddonScreenshot", "AddonType", "startup", "shutdown", @@ -21,8 +18,7 @@ const IGNORE_PRIVATE = ["AddonAuthor", "AddonCompatibilityOverride", "recordTimestamp", "recordSimpleMeasure", "recordException", "getSimpleMeasures", "simpleTimer", "setTelemetryDetails", "getTelemetryDetails", - "callNoUpdateListeners", "backgroundUpdateTimerHandler", - "hasUpgradeListener", "getUpgradeListener"]; + "callNoUpdateListeners", "backgroundUpdateTimerHandler"]; function test_functions() { for (let prop in AddonManager) { @@ -31,25 +27,9 @@ function test_functions() { if (typeof AddonManager[prop] != "function") continue; - let args = []; - - // Getter functions need a callback and in some cases not having one will - // throw before checking if the add-ons manager is initialized so pass in - // an empty one. - if (prop.startsWith("get")) { - // For now all getter functions with more than one argument take the - // callback in the second argument. - if (AddonManager[prop].length > 1) { - args.push(undefined, () => {}); - } - else { - args.push(() => {}); - } - } - try { do_print("AddonManager." + prop); - AddonManager[prop](...args); + AddonManager[prop](); do_throw(prop + " did not throw an exception"); } catch (e) { |