B2G/gecko/toolkit/components/places/tests/unit/test_415757.js
/**
 * Checks to see that a URI is in the database.
 *
 * @param aURI
 *        The URI to check.
 * @returns true if the URI is in the DB, false otherwise.
 */
Checks to see that a URI is in the database.
@param aURI
The URI to check.
@returns true if the URI is in the DB, false otherwise.
Checks to see that a URI is in the database . @param aURI The URI to check . @returns true if the URI is in the DB false otherwise .
function uri_in_db(aURI) {
  var options = histsvc.getNewQueryOptions();
  options.maxResults = 1;
  options.resultType = options.RESULTS_AS_URI
  var query = histsvc.getNewQuery();
  query.uri = aURI;
  var result = histsvc.executeQuery(query, options);
  var root = result.root;
  root.containerOpen = true;
  var cc = root.childCount;
  root.containerOpen = false;
  return (cc == 1);
}
function uri_in_db ( aURI ) { var options = histsvc . getNewQueryOptions ( ) ; options . maxResults = 1 ; options . resultType = options . RESULTS_AS_URI var query = histsvc . getNewQuery ( ) ; query . uri = aURI ; var result = histsvc . executeQuery ( query , options ) ; var root = result . root ; root . containerOpen = true ; var cc = root . childCount ; root . containerOpen = false ; return ( cc == 1 ) ; }
Checks to see that a URI is in the database.
Checks to see that a URI is in the database .