B2G/gecko/browser/base/content/test/browser_sanitizeDialog_treeView.js
/**
 * Adds a history visit to history.
 *
 * @param aMinutesAgo
 *        The visit will be visited this many minutes ago
 */
Adds a history visit to history.
@param aMinutesAgo
The visit will be visited this many minutes ago
Adds a history visit to history . @param aMinutesAgo The visit will be visited this many minutes ago
function addHistoryWithMinutesAgo(aMinutesAgo) {
  let pURI = makeURI("http://" + aMinutesAgo + "-minutes-ago.com/");
  PlacesUtils.history.addVisit(pURI,
                               now_uSec - (aMinutesAgo * 60 * 1000 * 1000),
                               null,
                               Ci.nsINavHistoryService.TRANSITION_LINK,
                               false,
                               0);
  is(PlacesUtils.bhistory.isVisited(pURI), true,
     "Sanity check: history visit " + pURI.spec +
     " should exist after creating it");
  return pURI;
}
function addHistoryWithMinutesAgo ( aMinutesAgo ) { let pURI = makeURI ( "http://" + aMinutesAgo + "-minutes-ago.com/" ) ; PlacesUtils . history . addVisit ( pURI , now_uSec - ( aMinutesAgo * 60 * 1000 * 1000 ) , null , Ci . nsINavHistoryService . TRANSITION_LINK , false , 0 ) ; is ( PlacesUtils . bhistory . isVisited ( pURI ) , true , "Sanity check: history visit " + pURI . spec + " should exist after creating it" ) ; return pURI ; }
Adds a history visit to history.
Adds a history visit to history .