B2G/gecko/toolkit/mozapps/extensions/test/xpcshell/head_addons.js
/**
 * Returns an extension uri spec
 *
 * @param  aProfileDir
 *         The extension install directory
 * @return a uri spec pointing to the root of the extension
 */
Returns an extension uri spec
@param  aProfileDir
The extension install directory
@return a uri spec pointing to the root of the extension
Returns an extension uri spec @param aProfileDir The extension install directory @return a uri spec pointing to the root of the extension
function do_get_addon_root_uri(aProfileDir, aId) {
  let path = aProfileDir.clone();
  path.append(aId);
  if (!path.exists()) {
    path.leafName += ".xpi";
    return "jar:" + Services.io.newFileURI(path).spec + "!/";
  }
  else {
    return Services.io.newFileURI(path).spec;
  }
}
function do_get_addon_root_uri ( aProfileDir , aId ) { let path = aProfileDir . clone ( ) ; path . append ( aId ) ; if ( ! path . exists ( ) ) { path . leafName += ".xpi" ; return "jar:" + Services . io . newFileURI ( path ) . spec + "!/" ; } else { return Services . io . newFileURI ( path ) . spec ; } }
Returns an extension uri spec
 @param  aProfileDir
         The extension install directory
 @return a uri spec pointing to the root of the extension
Returns an extension uri spec @param aProfileDir The extension install directory @return a uri spec pointing to the root of the extension