B2G/gecko/toolkit/components/places/tests/unit/test_history.js
/**
 * Adds a test URI visit to the database, and checks for a valid place ID.
 *
 * @param aURI
 *        The URI to add a visit for.
 * @param aReferrer
 *        The referring URI for the given URI.  This can be null.
 * @returns the place id for aURI.
 */
Adds a test URI visit to the database, and checks for a valid place ID.
@param aURI
The URI to add a visit for.
@param aReferrer
The referring URI for the given URI.  This can be null.
@returns the place id for aURI.
Adds a test URI visit to the database and checks for a valid place ID . @param aURI The URI to add a visit for . @param aReferrer The referring URI for the given URI . This can be null . @returns the place id for aURI .
function add_visit(aURI, aReferrer) {
  var visitId = histsvc.addVisit(aURI,
                                 Date.now() * 1000,
                                 aReferrer,
                                 histsvc.TRANSITION_TYPED, 
                                 false, 
                                 0);
  dump("### Added visit with id of " + visitId + "\n");
  do_check_true(gh.isVisited(aURI));
  do_check_guid_for_uri(aURI);
  return visitId;
}
function add_visit ( aURI , aReferrer ) { var visitId = histsvc . addVisit ( aURI , Date . now ( ) * 1000 , aReferrer , histsvc . TRANSITION_TYPED , false , 0 ) ; dump ( "### Added visit with id of " + visitId + "\n" ) ; do_check_true ( gh . isVisited ( aURI ) ) ; do_check_guid_for_uri ( aURI ) ; return visitId ; }
Adds a test URI visit to the database, and checks for a valid place ID.
Adds a test URI visit to the database and checks for a valid place ID .
// user typed in URL bar // not redirect