B2G/gecko/toolkit/components/places/tests/bookmarks/test_changeBookmarkURI.js
/**
 * Ensures that the Places APIs recognize that aBookmarkedUri is bookmarked
 * via aBookmarkId and that aUnbookmarkedUri is not bookmarked at all.
 *
 * @param aBookmarkId
 *        an item ID whose corresponding URI is aBookmarkedUri
 * @param aBookmarkedUri
 *        a bookmarked URI that has a corresponding item ID aBookmarkId
 * @param aUnbookmarkedUri
 *        a URI that is not currently bookmarked at all
 */
Ensures that the Places APIs recognize that aBookmarkedUri is bookmarked
via aBookmarkId and that aUnbookmarkedUri is not bookmarked at all.

@param aBookmarkId
an item ID whose corresponding URI is aBookmarkedUri
@param aBookmarkedUri
a bookmarked URI that has a corresponding item ID aBookmarkId
@param aUnbookmarkedUri
a URI that is not currently bookmarked at all
Ensures that the Places APIs recognize that aBookmarkedUri is bookmarked via aBookmarkId and that aUnbookmarkedUri is not bookmarked at all . @param aBookmarkId an item ID whose corresponding URI is aBookmarkedUri @param aBookmarkedUri a bookmarked URI that has a corresponding item ID aBookmarkId @param aUnbookmarkedUri a URI that is not currently bookmarked at all
function checkUris(aBookmarkId, aBookmarkedUri, aUnbookmarkedUri)
{
  var uri = bmsvc.getBookmarkedURIFor(aBookmarkedUri);
  do_check_neq(uri, null);
  do_check_true(uri.equals(aBookmarkedUri));
  do_check_true(bmsvc.isBookmarked(aBookmarkedUri));
  do_check_true(bmsvc.getBookmarkURI(aBookmarkId).equals(aBookmarkedUri));
  uri = bmsvc.getBookmarkedURIFor(aUnbookmarkedUri);
  do_check_eq(uri, null);
  do_check_false(bmsvc.isBookmarked(aUnbookmarkedUri));
}
function checkUris ( aBookmarkId , aBookmarkedUri , aUnbookmarkedUri ) { var uri = bmsvc . getBookmarkedURIFor ( aBookmarkedUri ) ; do_check_neq ( uri , null ) ; do_check_true ( uri . equals ( aBookmarkedUri ) ) ; do_check_true ( bmsvc . isBookmarked ( aBookmarkedUri ) ) ; do_check_true ( bmsvc . getBookmarkURI ( aBookmarkId ) . equals ( aBookmarkedUri ) ) ; uri = bmsvc . getBookmarkedURIFor ( aUnbookmarkedUri ) ; do_check_eq ( uri , null ) ; do_check_false ( bmsvc . isBookmarked ( aUnbookmarkedUri ) ) ; }
Ensures that the Places APIs recognize that aBookmarkedUri is bookmarked
 via aBookmarkId and that aUnbookmarkedUri is not bookmarked at all.
Ensures that the Places APIs recognize that aBookmarkedUri is bookmarked via aBookmarkId and that aUnbookmarkedUri is not bookmarked at all .
// Ensure that aBookmarkedUri equals some URI that is bookmarked // Ensure that aBookmarkedUri is considered bookmarked // Ensure that the URI corresponding to aBookmarkId equals aBookmarkedUri // Ensure that aUnbookmarkedUri does not equal any URI that is bookmarked // Ensure that aUnbookmarkedUri is not considered bookmarked