* Test ghost row count with spans.
*/
public void testGhostRowSpans() {
// Initialize the table
FixedWidthFlexTable testTable = getFixedWidthFlexTable();
FlexCellFormatter cellFormatter = testTable.getFlexCellFormatter();
for (int row = 0; row < 3; row++) {
for (int cell = 0; cell < 3; cell++) {
testTable.setHTML(row, cell, "");
}
}
// Set colspan
assertGhostCount(3, testTable);
cellFormatter.setColSpan(0, 1, 3);
assertGhostCount(5, testTable);
cellFormatter.setColSpan(0, 1, 2);
assertGhostCount(4, testTable);
cellFormatter.setColSpan(0, 1, 1);
assertGhostCount(3, testTable);
cellFormatter.setColSpan(0, 1, 0);
assertGhostCount(3, testTable);
// Set rowspan
assertGhostCount(3, testTable);
cellFormatter.setRowSpan(0, 1, 3);
assertGhostCount(4, testTable);
cellFormatter.setRowSpan(0, 1, 2);
assertGhostCount(4, testTable);
cellFormatter.setRowSpan(0, 1, 1);
assertGhostCount(3, testTable);
}