  var adj = (c == expectedColumns.length - 1) ? 1 : 0; 
  var adj = 1; 
function testtag_tree_columns(tree, expectedColumns, testid){  testid += " ";  var columns = tree.columns;  is(columns instanceof TreeColumns, true, testid + "columns is a TreeColumns");  is(columns.count, expectedColumns.length, testid + "TreeColumns count");  is(columns.length, expectedColumns.length, testid + "TreeColumns length");  var treecols = tree.getElementsByTagName("treecols")[0];  var treecol = treecols.getElementsByTagName("treecol");  var x = 0;  var primary = null, sorted = null, key = null;  for (var c = 0; c < expectedColumns.length; c++) {    var adjtestid = testid + " column " + c + " ";    var column = columns[c];    var expectedColumn = expectedColumns[c];    is(columns.getColumnAt(c), column, adjtestid + "getColumnAt");    is(columns.getNamedColumn(expectedColumn.name), column, adjtestid + "getNamedColumn");    is(columns.getColumnFor(treecol[c]), column, adjtestid + "getColumnFor");    if (expectedColumn.primary)      primary = column;    if (expectedColumn.sorted)      sorted = column;    if (expectedColumn.key)      key = column;    // XXXndeakin on Windows and Linux, the last column is one pixel to the    // left of where is should be. Could just be a rounding issue.    var adj = (c == expectedColumns.length - 1) ? 1 : 0;    is(column.x + adj >= x, true, adjtestid + "position is after last column " +       column.x + "," + column.width + "," + x);    is(column.width > 0, true, adjtestid + "width is greater than 0");    x = column.x + column.width;    // now check the TreeColumn properties    is(column instanceof TreeColumn, true, adjtestid + "is a TreeColumn");    is(column.element, treecol[c], adjtestid + "element is treecol");    is(column.columns, columns, adjtestid + "columns is TreeColumns");    is(column.id, expectedColumn.name, adjtestid + "name");    is(column.index, c, adjtestid + "index");    is(column.primary, primary == column, adjtestid + "column is primary");    is(column.cycler, "cycler" in expectedColumn && expectedColumn.cycler,                  adjtestid + "column is cycler");    is(column.selectable, true, adjtestid + "column is selectable");    is(column.editable, "editable" in expectedColumn && expectedColumn.editable,                  adjtestid + "column is editable");    is(column.type, "type" in expectedColumn ? expectedColumn.type : 1, adjtestid + "type");    is(column.getPrevious(), c > 0 ? columns[c - 1] : null, adjtestid + "getPrevious");    is(column.getNext(), c < columns.length - 1 ? columns[c + 1] : null, adjtestid + "getNext");    // check the view's getColumnProperties method    var properties = Components.classes["@mozilla.org/supports-array;1"].                       createInstance(Components.interfaces.nsISupportsArray);    tree.view.getColumnProperties(column, properties);    properties = convertProperties(properties);    var expectedProperties = expectedColumn.properties;    is(properties,  expectedProperties ? expectedProperties : "", adjtestid + "getColumnProperties");  }  is(columns.getFirstColumn(), columns[0], testid + "getFirstColumn");  is(columns.getLastColumn(), columns[columns.length - 1], testid + "getLastColumn");  is(columns.getPrimaryColumn(), primary, testid + "getPrimaryColumn");  is(columns.getSortedColumn(), sorted, testid + "getSortedColumn");  is(columns.getKeyColumn(), key, testid + "getKeyColumn");  is(columns.getColumnAt(-1), null, testid + "getColumnAt under");  is(columns.getColumnAt(columns.length), null, testid + "getColumnAt over");  is(columns.getNamedColumn(""), null, testid + "getNamedColumn null");  is(columns.getNamedColumn("unknown"), null, testid + "getNamedColumn unknown");  is(columns.getColumnFor(null), null, testid + "getColumnFor null");  is(columns.getColumnFor(tree), null, testid + "getColumnFor other");}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/b7156f004f428b6ab9afe8d3e3eefa8ec87494f9/tree_shared.js/buggy/toolkit/content/tests/widgets/tree_shared.js