B2G/gecko/toolkit/components/places/tests/unit/test_download_history.js
/**
 * Waits for the first visit notification to be received.
 *
 * @param aCallback
 *        This function is called with the same arguments of onVisit.
 */
Waits for the first visit notification to be received.
@param aCallback
This function is called with the same arguments of onVisit.
Waits for the first visit notification to be received . @param aCallback This function is called with the same arguments of onVisit .
function waitForOnVisit(aCallback) {
  let historyObserver = {
    __proto__: NavHistoryObserver.prototype,
    onVisit: function HO_onVisit() {
      PlacesUtils.history.removeObserver(this);
      aCallback.apply(null, arguments);
    }
  };
  PlacesUtils.history.addObserver(historyObserver, false);
}
function waitForOnVisit ( aCallback ) { let historyObserver = { __proto__ : NavHistoryObserver . prototype , onVisit : function HO_onVisit ( ) { PlacesUtils . history . removeObserver ( this ) ; aCallback . apply ( null , arguments ) ; } } ; PlacesUtils . history . addObserver ( historyObserver , false ) ; }
Waits for the first visit notification to be received.
Waits for the first visit notification to be received .