diff options
Diffstat (limited to 'toolkit/content/tests/widgets/tree_shared.js')
-rw-r--r-- | toolkit/content/tests/widgets/tree_shared.js | 30 |
1 files changed, 13 insertions, 17 deletions
diff --git a/toolkit/content/tests/widgets/tree_shared.js b/toolkit/content/tests/widgets/tree_shared.js index ba52bf828e..2cc40686ec 100644 --- a/toolkit/content/tests/widgets/tree_shared.js +++ b/toolkit/content/tests/widgets/tree_shared.js @@ -321,11 +321,7 @@ function testtag_tree_columns(tree, expectedColumns, testid) { // check the view's getColumnProperties method var properties = tree.view.getColumnProperties(column); var expectedProperties = expectedColumn.properties; - is( - properties, - expectedProperties ? expectedProperties : "", - adjtestid + "getColumnProperties" - ); + is(properties, expectedProperties || "", adjtestid + "getColumnProperties"); } is(columns.getFirstColumn(), columns[0], testid + "getFirstColumn"); @@ -574,10 +570,10 @@ function testtag_tree_TreeSelection_UI(tree, testid, multiple) { var keydownFired = 0; var keypressFired = 0; - function keydownListener(event) { + function keydownListener() { keydownFired++; } - function keypressListener(event) { + function keypressListener() { keypressFired++; } @@ -1307,7 +1303,7 @@ function testtag_tree_TreeView_rows(tree, testid, rowInfo, startRow) { isContainer(row) { return row.container; }, - isContainerOpen(row) { + isContainerOpen() { return false; }, isContainerEmpty(row) { @@ -1325,7 +1321,7 @@ function testtag_tree_TreeView_rows(tree, testid, rowInfo, startRow) { getParentIndex(row) { return row.parent; }, - hasNextSibling(row) { + hasNextSibling() { return r < startRow + length - 1; }, }; @@ -1433,7 +1429,7 @@ function testtag_tree_TreeView_rows(tree, testid, rowInfo, startRow) { } } -function testtag_tree_TreeView_rows_sort(tree, testid, rowInfo) { +function testtag_tree_TreeView_rows_sort(tree) { // check if cycleHeader sorts the columns var columnIndex = 0; var view = tree.view; @@ -1734,7 +1730,7 @@ function testtag_tree_wheel(aTree) { var defaultPrevented = 0; - function wheelListener(event) { + function wheelListener() { defaultPrevented++; } window.addEventListener("wheel", wheelListener); @@ -2109,7 +2105,7 @@ function mouseClickOnColumnHeader( } } -function mouseDblClickOnCell(tree, row, column, testname) { +function mouseDblClickOnCell(tree, row, column) { // select the row we will edit var selection = tree.view.selection; selection.select(row); @@ -2151,12 +2147,12 @@ function convertDOMtoTreeRowInfo(treechildren, level, rowidx) { for (var c = 0; c < treerow.childNodes.length; c++) { var cell = treerow.childNodes[c]; cellInfo.push({ - label: "" + cell.getAttribute("label"), - value: cell.getAttribute("value"), - properties: cell.getAttribute("properties"), + label: cell.getAttribute("label") || "", + value: cell.getAttribute("value") || "", + properties: cell.getAttribute("properties") || "", editable: cell.getAttribute("editable") != "false", selectable: cell.getAttribute("selectable") != "false", - image: cell.getAttribute("src"), + image: cell.getAttribute("src") || "", mode: cell.hasAttribute("mode") ? parseInt(cell.getAttribute("mode")) : 3, @@ -2170,7 +2166,7 @@ function convertDOMtoTreeRowInfo(treechildren, level, rowidx) { : convertDOMtoTreeRowInfo(descendants, level + 1, rowidx); obj.rows.push({ cells: cellInfo, - properties: treerow.getAttribute("properties"), + properties: treerow.getAttribute("properties") || "", container: treeitem.getAttribute("container") == "true", separator: treeitem.localName == "treeseparator", children, |