B2G/gecko/browser/components/places/tests/browser/browser_sort_in_library.js
/**
 * Tries sorting by an invalid column and sort direction.
 *
 * @param aOrganizerWin
 *        the Places window
 * @param aPlaceContentTree
 *        the placeContent tree in aOrganizerWin
 */
Tries sorting by an invalid column and sort direction.
@param aOrganizerWin
the Places window
@param aPlaceContentTree
the placeContent tree in aOrganizerWin
Tries sorting by an invalid column and sort direction . @param aOrganizerWin the Places window @param aPlaceContentTree the placeContent tree in aOrganizerWin
function testInvalid(aOrganizerWin, aPlaceContentTree) {
  let bogusCol = document.createElement("treecol");
  bogusCol.setAttribute("anonid", "bogusColumn");
  setSort(aOrganizerWin, aPlaceContentTree, true, true, bogusCol, "ascending");
  setSort(aOrganizerWin, aPlaceContentTree, false, false, null, "bogus dir");
  checkSort(aPlaceContentTree, Ci.nsINavHistoryQueryOptions.SORT_BY_NONE, "");
}
function testInvalid ( aOrganizerWin , aPlaceContentTree ) { let bogusCol = document . createElement ( "treecol" ) ; bogusCol . setAttribute ( "anonid" , "bogusColumn" ) ; setSort ( aOrganizerWin , aPlaceContentTree , true , true , bogusCol , "ascending" ) ; setSort ( aOrganizerWin , aPlaceContentTree , false , false , null , "bogus dir" ) ; checkSort ( aPlaceContentTree , Ci . nsINavHistoryQueryOptions . SORT_BY_NONE , "" ) ; }
Tries sorting by an invalid column and sort direction.
Tries sorting by an invalid column and sort direction .
// Invalid column should fail by throwing an exception. // Invalid direction reverts to SORT_BY_NONE.