B2G/gecko/toolkit/components/places/tests/unit/test_hosts_triggers.js
// for each change check that moz_hosts has correctly been updated.
for each change check that moz_hosts has correctly been updated.
for each change check that moz_hosts has correctly been updated .
function isHostInMozPlaces(aURI)
{
  let stmt = DBConn().createStatement(
    "SELECT url "
    + "FROM moz_places "
    + "WHERE url = :host"
  );
  let result = false;
  stmt.params.host = aURI.spec;
  while(stmt.executeStep()) {
    if (stmt.row.url == aURI.spec) {
      result = true;
      break;
    }
  }
  stmt.finalize();
  return result;
}
function isHostInMozPlaces ( aURI ) { let stmt = DBConn ( ) . createStatement ( "SELECT url " + "FROM moz_places " + "WHERE url = :host" ) ; let result = false ; stmt . params . host = aURI . spec ; while ( stmt . executeStep ( ) ) { if ( stmt . row . url == aURI . spec ) { result = true ; break ; } } stmt . finalize ( ) ; return result ; }
for each change check that moz_hosts has correctly been updated.
for each change check that moz_hosts has correctly been updated .