B2G/gecko/toolkit/mozapps/extensions/test/browser/head.js
/**
   * Creates a set of mock add-on install objects and adds them to the list
   * of installs managed by this provider.
   *
   * @param  aInstallProperties
   *         An array of objects containing properties describing the installs
   * @return Array of the new MockInstalls
   */
Creates a set of mock add-on install objects and adds them to the list
of installs managed by this provider.

@param  aInstallProperties
An array of objects containing properties describing the installs
@return Array of the new MockInstalls
Creates a set of mock add - on install objects and adds them to the list of installs managed by this provider . @param aInstallProperties An array of objects containing properties describing the installs @return Array of the new MockInstalls
function MP_createInstalls(aInstallProperties) {
    var newInstalls = [];
    for (let installProp of aInstallProperties) {
      let install = new MockInstall(installProp.name || null,
                                    installProp.type || null,
                                    null);
      for (let prop in installProp) {
        switch (prop) {
          case "name":
          case "type":
            break;
          case "sourceURI":
            install[prop] = NetUtil.newURI(installProp[prop]);
            break;
          default:
            install[prop] = installProp[prop];
        }
      }
      this.addInstall(install);
      newInstalls.push(install);
    }
    return newInstalls;
  }
function MP_createInstalls ( aInstallProperties ) { var newInstalls = [ ] ; for ( let installProp of aInstallProperties ) { let install = new MockInstall ( installProp . name || null , installProp . type || null , null ) ; for ( let prop in installProp ) { switch ( prop ) { case "name" : case "type" : break ; case "sourceURI" : install [ prop ] = NetUtil . newURI ( installProp [ prop ] ) ; break ; default : install [ prop ] = installProp [ prop ] ; } } this . addInstall ( install ) ; newInstalls . push ( install ) ; } return newInstalls ; }
Creates a set of mock add-on install objects and adds them to the list
 of installs managed by this provider.
Creates a set of mock add - on install objects and adds them to the list of installs managed by this provider .