add:  function EditorShowEmbeddedObjects() { dump("\nEmbedded Objects:\n"); var objectArray = editorShell.GetEmbeddedObjects(); dump(objectArray.Count() + " embedded objects\n"); for (var i=0; i < objectArray.Count(); ++i) dump(objectArray.GetElementAt(i) + "\n"); }  function EditorUnitTests() { dump("Running Unit Tests\n"); editorShell.RunUnitTests(); }  function EditorTestDocument() { dump("Getting document\n"); var theDoc = editorShell.editorDocument; if (theDoc) { dump("Got the doc\n"); dump("Document name:" + theDoc.nodeName + "\n"); dump("Document type:" + theDoc.doctype + "\n"); } else { dump("Failed to get the doc\n"); } }    function EditorExecuteScript(fileSpec) { fileSpec.openStreamForReading();  var buf         = { value:null }; var tmpBuf      = { value:null }; var didTruncate = { value:false }; var lineNum     = 0; var ex;     while (!fileSpec.eof()) { buf.value         = ""; didTruncate.value = true;     while (didTruncate.value && !fileSpec.eof()) { didTruncate.value = false; fileSpec.readLine(tmpBuf, 1024, didTruncate); buf.value += tmpBuf.value;       tmpBuf.value = null; }  ++lineNum;  try       { eval(buf.value); } catch(ex) { dump("Playback ERROR: Line " + lineNum + "  " + ex + "\n"); return; } }  buf.value = null; }  function EditorGetScriptFileSpec() { var fs = Components.classes["component: fs = fs.QueryInterface(Components.interfaces.nsIFileSpec); fs.unixStyleFilePath = "journal.js"; return fs; }  function EditorStartLog() { var fs;  fs = EditorGetScriptFileSpec(); editorShell.StartLogging(fs); contentWindow.focus();  fs = null; }  function EditorStopLog() { editorShell.StopLogging(); contentWindow.focus(); }  function EditorRunLog() { var fs; fs = EditorGetScriptFileSpec(); EditorExecuteScript(fs); contentWindow.focus(); } 
context: function EditorTestTableLayout(){  var table = editorShell.GetElementOrParentByTagName("table", null);  if (!table) {    dump("Enclosing Table not found: Place caret in a table cell to do this test\n\n");    return;  }      var cell;  var startRowIndexObj = new Object();  var startColIndexObj = new Object();  var rowSpanObj = new Object();  var colSpanObj = new Object();  var isSelectedObj = new Object();  var startRowIndex = 0;  var startColIndex = 0;  var rowSpan;  var colSpan;  var isSelected;  var col = 0;  var row = 0;  var rowCount = 0;  var maxColCount = 0;  var doneWithRow = false;  var doneWithCol = false;  dump("\n\n\n************ Starting Table Layout test ************\n");  // Note: We could also get the number of rows, cols and use for loops,  //   but this tests using out-of-bounds offsets to detect end of row or column  while (!doneWithRow)  // Iterate through rows  {      while(!doneWithCol)  // Iterate through cells in the row    {      try {        cell = editorShell.GetCellDataAt(table, row, col, startRowIndexObj, startColIndexObj,                                         rowSpanObj, colSpanObj, isSelectedObj);        if (cell)        {          rowSpan = rowSpanObj.value;          colSpan = colSpanObj.value;          isSelected = isSelectedObj.value;                    dump("Row,Col: "+row+","+col+" StartRow,StartCol: "+startRowIndexObj.value+","+startColIndexObj.value+" RowSpan="+rowSpan+" ColSpan="+colSpan);          if (isSelected)            dump("  Cell is selected\n");          else            dump("  Cell is NOT selected\n");          // Save the indexes of a cell that will span across the cellmap grid          if (rowSpan > 1)            startRowIndex = startRowIndexObj.value;          if (colSpan > 1)            startColIndex = startColIndexObj.value;          // Initialize these for efficient spanned-cell search          startRowIndexObj.value = startRowIndex;          startColIndexObj.value = startColIndex;          col++;        } else {          doneWithCol = true;          // Get maximum number of cells in any row          if (col > maxColCount)            maxColCount = col;          dump(" End of row found\n\n");        }      }      catch (e) {        dump("  *** GetCellDataAt barfed at Row,Col:"+row+","+col+" ***\n\n");        col++;      }    }    if (col == 0) {      // Didn't find a cell in the first col of a row,      // thus no more rows in table      doneWithRow = true;      rowCount = row;      dump("No more rows in table\n\n");    } else {      // Setup for next row      col = 0;      row++;      doneWithCol = false;      dump("Setup for next row\n");    }        }  dump("Counted during scan: Number of rows="+rowCount+" Number of Columns="+maxColCount+"\n");  rowCount = editorShell.GetTableRowCount(table);  maxColCount = editorShell.GetTableColumnCount(table);  dump("From nsITableLayout: Number of rows="+rowCount+" Number of Columns="+maxColCount+"\n****** End of Table Layout Test *****\n\n");}
meta: 8395	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/8395/1a85d5b77534f44c924147c890978887744effab/EditorCommandsDebug.js/clean/editor/ui/composer/content/EditorCommandsDebug.js