B2G/gecko/toolkit/components/places/tests/head_common.js
/**
 * Checks that we don't have any bookmark
 */
Checks that we don't have any bookmark
Checks that we don ' t have any bookmark
function check_no_bookmarks() {
  let query = PlacesUtils.history.getNewQuery();
  let folders = [
    PlacesUtils.bookmarks.toolbarFolder,
    PlacesUtils.bookmarks.bookmarksMenuFolder,
    PlacesUtils.bookmarks.unfiledBookmarksFolder,
  ];
  query.setFolders(folders, 3);
  let options = PlacesUtils.history.getNewQueryOptions();
  options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
  let root = PlacesUtils.history.executeQuery(query, options).root;
  root.containerOpen = true;
  if (root.childCount != 0)
    do_throw("Unable to remove all bookmarks");
  root.containerOpen = false;
}
function check_no_bookmarks ( ) { let query = PlacesUtils . history . getNewQuery ( ) ; let folders = [ PlacesUtils . bookmarks . toolbarFolder , PlacesUtils . bookmarks . bookmarksMenuFolder , PlacesUtils . bookmarks . unfiledBookmarksFolder , ] ; query . setFolders ( folders , 3 ) ; let options = PlacesUtils . history . getNewQueryOptions ( ) ; options . queryType = Ci . nsINavHistoryQueryOptions . QUERY_TYPE_BOOKMARKS ; let root = PlacesUtils . history . executeQuery ( query , options ) . root ; root . containerOpen = true ; if ( root . childCount != 0 ) do_throw ( "Unable to remove all bookmarks" ) ; root . containerOpen = false ; }
Checks that we don't have any bookmark
Checks that we don ' t have any bookmark