B2G/gecko/toolkit/mozapps/extensions/test/browser/head.js
/***** Mock Addon object for the Mock Provider *****/
Mock Addon object for the Mock Provider
Mock Addon object for the Mock Provider
function MockAddon(aId, aName, aType, aOperationsRequiringRestart) {
  this.id = aId || "";
  this.name = aName || "";
  this.type = aType || "extension";
  this.version = "";
  this.isCompatible = true;
  this.providesUpdatesSecurely = true;
  this.blocklistState = 0;
  this._appDisabled = false;
  this._userDisabled = false;
  this._applyBackgroundUpdates = AddonManager.AUTOUPDATE_ENABLE;
  this.scope = AddonManager.SCOPE_PROFILE;
  this.isActive = true;
  this.creator = "";
  this.pendingOperations = 0;
  this._permissions = AddonManager.PERM_CAN_UNINSTALL |
                      AddonManager.PERM_CAN_ENABLE |
                      AddonManager.PERM_CAN_DISABLE |
                      AddonManager.PERM_CAN_UPGRADE;
  this.operationsRequiringRestart = aOperationsRequiringRestart ||
    (AddonManager.OP_NEEDS_RESTART_INSTALL |
     AddonManager.OP_NEEDS_RESTART_UNINSTALL |
     AddonManager.OP_NEEDS_RESTART_ENABLE |
     AddonManager.OP_NEEDS_RESTART_DISABLE);
}
function MockAddon ( aId , aName , aType , aOperationsRequiringRestart ) { this . id = aId || "" ; this . name = aName || "" ; this . type = aType || "extension" ; this . version = "" ; this . isCompatible = true ; this . providesUpdatesSecurely = true ; this . blocklistState = 0 ; this . _appDisabled = false ; this . _userDisabled = false ; this . _applyBackgroundUpdates = AddonManager . AUTOUPDATE_ENABLE ; this . scope = AddonManager . SCOPE_PROFILE ; this . isActive = true ; this . creator = "" ; this . pendingOperations = 0 ; this . _permissions = AddonManager . PERM_CAN_UNINSTALL | AddonManager . PERM_CAN_ENABLE | AddonManager . PERM_CAN_DISABLE | AddonManager . PERM_CAN_UPGRADE ; this . operationsRequiringRestart = aOperationsRequiringRestart || ( AddonManager . OP_NEEDS_RESTART_INSTALL | AddonManager . OP_NEEDS_RESTART_UNINSTALL | AddonManager . OP_NEEDS_RESTART_ENABLE | AddonManager . OP_NEEDS_RESTART_DISABLE ) ; }
Mock Addon object for the Mock Provider
Mock Addon object for the Mock Provider
// Only set required attributes.