B2G/gecko/toolkit/components/places/tests/unit/test_async_history_api.js
/**
 * Tests that a title was set properly in the database.
 *
 * @param aURI
 *        The uri to check.
 * @param aTitle
 *        The expected title in the database.
 */
Tests that a title was set properly in the database.
@param aURI
The uri to check.
@param aTitle
The expected title in the database.
Tests that a title was set properly in the database . @param aURI The uri to check . @param aTitle The expected title in the database .
function do_check_title_for_uri(aURI,
                                aTitle)
{
  let stack = Components.stack.caller;
  let stmt = DBConn().createStatement(
    "SELECT title " +
    "FROM moz_places " +
    "WHERE url = :url "
  );
  stmt.params.url = aURI.spec;
  do_check_true(stmt.executeStep(), stack);
  do_check_eq(stmt.row.title, aTitle, stack);
  stmt.finalize();
}
function do_check_title_for_uri ( aURI , aTitle ) { let stack = Components . stack . caller ; let stmt = DBConn ( ) . createStatement ( "SELECT title " + "FROM moz_places " + "WHERE url = :url " ) ; stmt . params . url = aURI . spec ; do_check_true ( stmt . executeStep ( ) , stack ) ; do_check_eq ( stmt . row . title , aTitle , stack ) ; stmt . finalize ( ) ; }
Tests that a title was set properly in the database.
Tests that a title was set properly in the database .