]> source.dussan.org Git - gwtquery.git/commitdiff
tests and fix for Issue_23
authorManolo Carrasco <manolo@apache.org>
Thu, 13 May 2010 09:40:31 +0000 (09:40 +0000)
committerManolo Carrasco <manolo@apache.org>
Thu, 13 May 2010 09:40:31 +0000 (09:40 +0000)
gwtquery-core/src/main/java/com/google/gwt/query/Query.gwt.xml
gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryCoreTest.java

index 1aee9798e67349b53ef07f3d1cc1937e1d0afceb..bf41a26d3e6be438a9c1e764e3b45daeb54bfd30 100644 (file)
@@ -78,6 +78,7 @@
         <when-type-assignable\r
                 class="com.google.gwt.query.client.impl.SelectorEngineImpl"/>\r
         <when-property-is name="user.agent" value="ie6"/>\r
+        <when-property-is name="user.agent" value="ie8"/>\r
     </replace-with>\r
 \r
     <replace-with class="com.google.gwt.query.client.impl.SelectorEngineXPath">\r
@@ -97,6 +98,9 @@
         <when-type-assignable\r
                 class="com.google.gwt.query.client.impl.SelectorEngineImpl"/>\r
         <when-property-is name="selectorCapability" value="native"/>\r
+        <none>\r
+           <when-property-is name="user.agent" value="ie8"/>\r
+        </none>\r
     </replace-with>\r
 \r
     <entry-point class='com.google.gwt.query.client.css.CSS'/>\r
index b645fc4195f73b87d78638e06b4e150752b82382..cbd1da2f218fdaa3b16f92ce11ffea07bbbc1714 100644 (file)
@@ -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("<table><tr><td><input type='radio' name='n' value='v1'>1</input><input type='radio' name='n' value='v2' checked='checked'>2</input></td><td><button>Click</button></tr><td></table>");
+    $("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);
+  }
+  
 }