From: Manolo Carrasco Date: Thu, 25 Aug 2011 16:32:42 +0000 (+0000) Subject: Adding a test unit for issue97 X-Git-Tag: release-1.3.2~247 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=88492e253571dde77ec9dd18e33bc60a0d2391ce;p=gwtquery.git Adding a test unit for issue97 --- 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(""); + assertEquals("", $("#cb").val()); + $("#cb").attr("checked", "checked"); + assertEquals("1", $("#cb").val()); + $("#cb").removeAttr("checked"); + assertEquals("", $("#cb").val()); + } + public void testWidthHeight() { $(e).html( "
Content 1
");