From 1ca2ceef931a98b6efdc21f84f29f7461b3cbb5f Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Thu, 13 May 2010 09:40:31 +0000 Subject: [PATCH] tests and fix for Issue_23 --- .../java/com/google/gwt/query/Query.gwt.xml | 4 ++++ .../gwt/query/client/GQueryCoreTest.java | 20 +++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/Query.gwt.xml b/gwtquery-core/src/main/java/com/google/gwt/query/Query.gwt.xml index 1aee9798..bf41a26d 100644 --- a/gwtquery-core/src/main/java/com/google/gwt/query/Query.gwt.xml +++ b/gwtquery-core/src/main/java/com/google/gwt/query/Query.gwt.xml @@ -78,6 +78,7 @@ + @@ -97,6 +98,9 @@ + + + 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 b645fc41..cbd1da2f 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 @@ -20,6 +20,7 @@ import static com.google.gwt.query.client.GQuery.$$; import com.google.gwt.dom.client.Element; import com.google.gwt.junit.client.GWTTestCase; +import com.google.gwt.user.client.Event; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.RootPanel; @@ -554,4 +555,23 @@ public class GQueryCoreTest extends GWTTestCase { assertEquals(1, $(".whatEver").size()); assertEquals(0, $(".whatever").size()); } + + int done = 0; + public void testIssue23() { + $(e).html("
12
"); + $("button").click(new Function() { + public boolean f(Event e) { + $("table > tbody > tr > td > input:checked").each(new Function() { + public void f(Element e) { + done ++; + } + }); + return true; + } + }); + done = 0; + $("button").click(); + assertEquals(1,done); + } + } -- 2.39.5