 testtag_tree_UI_editing(tree, testid); 
function testtag_tree(treeid, treerowinfoid, seltype, columnstype, testid){  netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  var multiple = (seltype == "multiple");  var editable = false;  var tree = document.getElementById(treeid);  var treerowinfo = document.getElementById(treerowinfoid);  var rowInfo = convertDOMtoTreeRowInfo(treerowinfo, 0, { value: -1 });  var columnInfo = (columnstype == "simple") ? columns_simpletree : columns_hiertree;  is(tree.view.selection.currentColumn, null, testid + " initial currentColumn");  is(tree.selType, seltype == "multiple" ? "" : seltype, testid + " seltype");  // note: the functions below should be in this order due to changes made in later tests    // select the first column in cell selection mode so that the selection  // functions can be tested  if (seltype == "cell")    tree.view.selection.currentColumn = tree.columns[0];  testtag_tree_columns(tree, columnInfo, testid);  testtag_tree_TreeSelection(tree, testid, multiple);  testtag_tree_TreeSelection_UI(tree, testid, multiple);  if (seltype == "cell")    testtag_tree_TreeSelection_UI_cell(tree, testid, rowInfo);  testtag_tree_TreeView(tree, testid, rowInfo);  testtag_tree_UI_editing(tree, testid);  is(tree.editable, editable, "editable");  // currently, the editable flag means that tree editing cannot be invoked  // by the user. However, editing can still be started with a script.  is(tree.editingRow, -1, testid + " initial editingRow");  is(tree.editingColumn, null, testid + " initial editingColumn");  var ecolumn = tree.columns[0];  tree.startEditing(1, ecolumn);  is(tree.editingRow, 1, testid + " startEditing editingRow");  is(tree.editingColumn, ecolumn, testid + " startEditing editingColumn");  is(tree.getAttribute("editing"), "true", testid + " startEditing editing attribute");  tree.stopEditing(true);  is(tree.editingRow, -1, testid + " stopEditing editingRow");  is(tree.editingColumn, null, testid + " stopEditing editingColumn");  is(tree.hasAttribute("editing"), false, testid + " stopEditing editing attribute");  tree.startEditing(-1, ecolumn);  is(tree.editingRow == -1 && tree.editingColumn == null, true, testid + " startEditing -1 editingRow");  tree.startEditing(15, ecolumn);  is(tree.editingRow == -1 && tree.editingColumn == null, true, testid + " startEditing 15 editingRow");  tree.startEditing(1, null);  is(tree.editingRow == -1 && tree.editingColumn == null, true, testid + " startEditing null column editingRow");  tree.startEditing(2, tree.columns[1]);  is(tree.editingRow == -1 && tree.editingColumn == null, true, testid + " startEditing non editable cell editingRow");  tree.startEditing(1, ecolumn);  var inputField = tree.inputField;  is(inputField instanceof Components.interfaces.nsIDOMXULTextBoxElement, true, testid + "inputField");  inputField.value = "Changed Value";  tree.stopEditing(true);  is(tree.view.getCellText(1, ecolumn), "Changed Value", testid + "edit cell accept");  // this cell cannot be edited  tree.startEditing(1, ecolumn);  inputField.value = "Second Value";  tree.stopEditing(false);  is(tree.view.getCellText(1, ecolumn), "Changed Value", testid + "edit cell no accept");  // do the sorting tests last as it will cause the rows to rearrange  testtag_tree_TreeView_rows_sort(tree, testid, rowInfo);  SimpleTest.finish();}
5872	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5872/0ecd9b5861b16b05d3e5a17661100181511d2d6f/tree_shared.js/clean/toolkit/content/tests/widgets/tree_shared.js