diff options
author | Manolo Carrasco <manolo@apache.org> | 2011-08-25 16:32:42 +0000 |
---|---|---|
committer | Manolo Carrasco <manolo@apache.org> | 2011-08-25 16:32:42 +0000 |
commit | 88492e253571dde77ec9dd18e33bc60a0d2391ce (patch) | |
tree | 6c862a8f097e67a9caf15e7196d56956ab938713 /gwtquery-core | |
parent | 274f65b2e494382981c98bf0d18172975301d1c4 (diff) | |
download | gwtquery-88492e253571dde77ec9dd18e33bc60a0d2391ce.tar.gz gwtquery-88492e253571dde77ec9dd18e33bc60a0d2391ce.zip |
Adding a test unit for issue97
Diffstat (limited to 'gwtquery-core')
-rw-r--r-- | gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java index 487af6f6..7a308d17 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java @@ -940,7 +940,16 @@ public class GQueryCoreTest extends GWTTestCase { assertEquals("check1", InputElement.as($("#text", e).get(0)).getValue()); } - + + public void testCheckedAttr_Issue97() { + $(e).html("<input type='checkbox' id='cb' name='cb' value='1' />"); + assertEquals("", $("#cb").val()); + $("#cb").attr("checked", "checked"); + assertEquals("1", $("#cb").val()); + $("#cb").removeAttr("checked"); + assertEquals("", $("#cb").val()); + } + public void testWidthHeight() { $(e).html( "<div style='border: 1px solid red; padding: 10px; margin:10px; width: 100px; height: 100px'>Content 1</div>"); |