B2G/gecko/toolkit/components/places/tests/unit/test_248970.js
/**
 * Function attempts to check if Bookmark-A has been visited
 * during private browsing mode, function should return false
 *
 * @returns false if the accessCount has not changed
 *          true if the accessCount has changed
 */
Function attempts to check if Bookmark-A has been visited
during private browsing mode, function should return false

@returns false if the accessCount has not changed
true if the accessCount has changed
Function attempts to check if Bookmark - A has been visited during private browsing mode function should return false @returns false if the accessCount has not changed true if the accessCount has changed
function is_bookmark_A_altered(){
  let options = PlacesUtils.history.getNewQueryOptions();
  options.queryType = Ci.nsINavHistoryQueryOptions.QUERY_TYPE_BOOKMARKS;
  options.maxResults = 1; 
  options.resultType = options.RESULT_TYPE_VISIT;
  let query = PlacesUtils.history.getNewQuery();
  query.setFolders([PlacesUtils.bookmarks.bookmarksMenuFolder],1);
  let root = PlacesUtils.history.executeQuery(query, options).root;
  root.containerOpen = true;
  do_check_eq(root.childCount,options.maxResults);
  let node = root.getChild(0);
  root.containerOpen = false;
  return (node.accessCount!=0);
}
function is_bookmark_A_altered ( ) { let options = PlacesUtils . history . getNewQueryOptions ( ) ; options . queryType = Ci . nsINavHistoryQueryOptions . QUERY_TYPE_BOOKMARKS ; options . maxResults = 1 ; options . resultType = options . RESULT_TYPE_VISIT ; let query = PlacesUtils . history . getNewQuery ( ) ; query . setFolders ( [ PlacesUtils . bookmarks . bookmarksMenuFolder ] , 1 ) ; let root = PlacesUtils . history . executeQuery ( query , options ) . root ; root . containerOpen = true ; do_check_eq ( root . childCount , options . maxResults ) ; let node = root . getChild ( 0 ) ; root . containerOpen = false ; return ( node . accessCount != 0 ) ; }
Function attempts to check if Bookmark-A has been visited
 during private browsing mode, function should return false
Function attempts to check if Bookmark - A has been visited during private browsing mode function should return false
// should only expect Bookmark-A