B2G/gecko/toolkit/components/places/tests/head_common.js
/**
 * Clears history invoking callback when done.
 *
 * @param aCallback
 *        Callback function to be called once clear history has finished.
 */
Clears history invoking callback when done.
@param aCallback
Callback function to be called once clear history has finished.
Clears history invoking callback when done . @param aCallback Callback function to be called once clear history has finished .
function waitForClearHistory(aCallback) {
  let observer = {
    observe: function(aSubject, aTopic, aData) {
      Services.obs.removeObserver(this, PlacesUtils.TOPIC_EXPIRATION_FINISHED);
      aCallback();
    }
  };
  Services.obs.addObserver(observer, PlacesUtils.TOPIC_EXPIRATION_FINISHED, false);
  PlacesUtils.bhistory.removeAllPages();
}
function waitForClearHistory ( aCallback ) { let observer = { observe : function ( aSubject , aTopic , aData ) { Services . obs . removeObserver ( this , PlacesUtils . TOPIC_EXPIRATION_FINISHED ) ; aCallback ( ) ; } } ; Services . obs . addObserver ( observer , PlacesUtils . TOPIC_EXPIRATION_FINISHED , false ) ; PlacesUtils . bhistory . removeAllPages ( ) ; }
Clears history invoking callback when done.
Clears history invoking callback when done .