Go to the source code of this file.
Functions | |
function | checkSort (aTree, aSortingMode, aSortingAnno) |
function | setSort (aOrganizerWin, aTree, aUnsortFirst, aShouldFail, aCol, aDir) |
function | testInvalid (aOrganizerWin, aPlaceContentTree) |
function | testSortByColAndDir (aOrganizerWin, aPlaceContentTree, aUnsortFirst) |
function | testSortByDir (aOrganizerWin, aPlaceContentTree, aUnsortFirst) |
function | test () |
Variables | |
const | SORT_LOOKUP_TABLE |
const | DEFAULT_SORT_KEY = "TITLE" |
let | prevSortDir = null |
let | prevSortKey = null |
function checkSort | ( | aTree, | |
aSortingMode, | |||
aSortingAnno | |||
) |
Ensures that the sort of aTree is aSortingMode and aSortingAnno.
aTree | the tree to check |
aSortingMode | one of the Ci.nsINavHistoryQueryOptions.SORT_BY_* constants |
aSortingAnno | checked only if sorting mode is one of the Ci.nsINavHistoryQueryOptions.SORT_BY_ANNOTATION_* constants |
Definition at line 103 of file browser_sort_in_library.js.
function setSort | ( | aOrganizerWin, | |
aTree, | |||
aUnsortFirst, | |||
aShouldFail, | |||
aCol, | |||
aDir | |||
) |
Sets the sort of aTree.
aOrganizerWin | the Places window |
aTree | the tree to sort |
aUnsortFirst | true if the sort should be set to SORT_BY_NONE before sorting by aCol and aDir |
aShouldFail | true if setSortColumn should fail on aCol or aDir |
aCol | the column of aTree by which to sort |
aDir | either "ascending" or "descending" |
Definition at line 140 of file browser_sort_in_library.js.
function test | ( | ) |
Definition at line 268 of file browser_sort_in_library.js.
function testInvalid | ( | aOrganizerWin, | |
aPlaceContentTree | |||
) |
Tries sorting by an invalid column and sort direction.
aOrganizerWin | the Places window |
aPlaceContentTree | the placeContent tree in aOrganizerWin |
Definition at line 190 of file browser_sort_in_library.js.
function testSortByColAndDir | ( | aOrganizerWin, | |
aPlaceContentTree, | |||
aUnsortFirst | |||
) |
Tests sorting aPlaceContentTree by column only and then by both column and direction.
aOrganizerWin | the Places window |
aPlaceContentTree | the placeContent tree in aOrganizerWin |
aUnsortFirst | true if, before each sort we try, we should sort to SORT_BY_NONE |
Definition at line 212 of file browser_sort_in_library.js.
function testSortByDir | ( | aOrganizerWin, | |
aPlaceContentTree, | |||
aUnsortFirst | |||
) |
Tests sorting aPlaceContentTree by direction only.
aOrganizerWin | the Places window |
aPlaceContentTree | the placeContent tree in aOrganizerWin |
aUnsortFirst | true if, before each sort we try, we should sort to SORT_BY_NONE |
Definition at line 256 of file browser_sort_in_library.js.
const DEFAULT_SORT_KEY = "TITLE" |
Definition at line 83 of file browser_sort_in_library.js.
let prevSortDir = null |
Definition at line 87 of file browser_sort_in_library.js.
let prevSortKey = null |
Definition at line 88 of file browser_sort_in_library.js.
const SORT_LOOKUP_TABLE |
Tests the following bugs:
Bug 443745 - View>Sort>of "alpha" sort items is default to Z>A instead of A>Z https://bugzilla.mozilla.org/show_bug.cgi?id=443745
Bug 444179 - Library>Views>Sort>Sort by Tags does nothing https://bugzilla.mozilla.org/show_bug.cgi?id=444179
Basically, fully tests sorting the placeContent tree in the Places Library window. Sorting is verified by comparing the nsINavHistoryResult returned by placeContent.getResult to the expected sort values.
Definition at line 64 of file browser_sort_in_library.js.