B2G/gecko/toolkit/mozapps/extensions/test/xpcshell/test_AddonRepository_cache.js
/*
 * Trigger an AddonManager background update check
 *
 * @param  aCallback
 *         Callback to call once the background update is complete
 */
Trigger an AddonManager background update check
@param  aCallback
Callback to call once the background update is complete
Trigger an AddonManager background update check @param aCallback Callback to call once the background update is complete
function trigger_background_update(aCallback) {
  Services.obs.addObserver({
    observe: function(aSubject, aTopic, aData) {
      Services.obs.removeObserver(this, "addons-background-update-complete");
      aCallback();
    }
  }, "addons-background-update-complete", false);
  gInternalManager.notify(null);
}
function trigger_background_update ( aCallback ) { Services . obs . addObserver ( { observe : function ( aSubject , aTopic , aData ) { Services . obs . removeObserver ( this , "addons-background-update-complete" ) ; aCallback ( ) ; } } , "addons-background-update-complete" , false ) ; gInternalManager . notify ( null ) ; }
Trigger an AddonManager background update check
 @param  aCallback
         Callback to call once the background update is complete
Trigger an AddonManager background update check @param aCallback Callback to call once the background update is complete