Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(160)

Unified Diff: user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java

Issue 134803: HTMLTable.Cell.getElement() calls getCellFormatter().getElement() with row and column swapped (Closed) Base URL: http://google-web-toolkit.googlecode.com/svn/trunk/
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « user/src/com/google/gwt/user/client/ui/HTMLTable.java ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java
===================================================================
--- user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java (revision 7463)
+++ user/test/com/google/gwt/user/client/ui/HTMLTableTestBase.java (working copy)
@@ -15,8 +15,10 @@
*/
package com.google.gwt.user.client.ui;
+import com.google.gwt.dom.client.TableCellElement;
import com.google.gwt.junit.client.GWTTestCase;
import com.google.gwt.user.client.Element;
+import com.google.gwt.user.client.ui.HTMLTable.Cell;
import com.google.gwt.user.client.ui.HTMLTable.CellFormatter;
import com.google.gwt.user.client.ui.HTMLTable.ColumnFormatter;
import com.google.gwt.user.client.ui.HTMLTable.RowFormatter;
@@ -76,6 +78,22 @@
fail("should have throw an index out of bounds");
}
+ /**
+ * Tests for {@link HTMLTable.Cell}.
+ */
+ public void testCell() {
+ HTMLTable table = getTable(1, 4);
+ table.setText(0, 3, "test");
+ Cell cell = table.new Cell(0, 3);
+
+ assertEquals(0, cell.getRowIndex());
+ assertEquals(3, cell.getCellIndex());
+
+ TableCellElement elem = cell.getElement().cast();
+ assertEquals(3, elem.getCellIndex());
+ assertEquals("test", elem.getInnerText());
+ }
+
public void testClearWidgetsAndHtml() {
HTMLTable table = getTable(4, 4);
for (int row = 0; row < 4; row++) {
« no previous file with comments | « user/src/com/google/gwt/user/client/ui/HTMLTable.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld revision f51cb906c4ad+