]> source.dussan.org Git - gwtquery.git/commitdiff
this is experimental code committed by mistake
authorManolo Carrasco <manolo@apache.org>
Wed, 20 Apr 2011 18:15:58 +0000 (18:15 +0000)
committerManolo Carrasco <manolo@apache.org>
Wed, 20 Apr 2011 18:15:58 +0000 (18:15 +0000)
gwtquery-core/pom.xml
gwtquery-core/src/main/java/com/google/gwt/query/client/impl/SelectorEngineNative.java

index 9abfe9e041d384027607dac253cbe86f346824a6..5fe5f0ac83cf3247dc64f6871b5b4944bf1c1917 100644 (file)
@@ -16,7 +16,7 @@
         <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
-            <version>3.8.1</version>
+            <version>4.7</version>
             <type>jar</type>
             <scope>test</scope>
         </dependency>
                     <forkMode>always</forkMode>
                     <!-- This makes emma:emma fail -->
                     <!-- <useSystemClassLoader>true</useSystemClassLoader>  -->
+                    <parallel>both</parallel>
+                    <threadCount>6</threadCount>
                     <systemProperties>
                         <property>
                             <name>gwt.args</name>
-                            <value>-out target/www</value>
+                            <value>-out target/www-junit</value>
+                            <name>gwt.noserver</name>
+                            <value>true</value>
                         </property>
                     </systemProperties>
                 </configuration>
index f8d2cd6c4402ec5515e405b099614c89d550d8a4..c068bb224e9ae330ae071b0b8703d1067e55a60a 100644 (file)
@@ -26,44 +26,26 @@ import com.google.gwt.dom.client.NodeList;
  * querySelectorAll support.
  */
 public class SelectorEngineNative extends SelectorEngineImpl {
-  
+
   public static String NATIVE_EXCEPTIONS_REGEXP = ".*(:contains|!=).*";
   
   private static HasSelector impl;
   
-  NodeList<Element> result = null;
-  
   public SelectorEngineNative() {
-  }
-  
-  RunAsyncCallback callBack = new RunAsyncCallback() {
-    public void onSuccess() {
-      if (impl == null) {
-        impl=GWT.create(HasSelector.class);
-      }
-    }
-    public void onFailure(Throwable reason) {
-    }
-  };
-  
-  private NodeList<Element> jsFallbackSelect (String selector, Node ctx) {
     if (impl == null) {
-      GWT.runAsync(callBack);
-      while (impl == null);
-    } 
-    return impl.select(selector, ctx);
+      impl = GWT.create(HasSelector.class);
+    }
   }
   
   public NodeList<Element> select(String selector, Node ctx) {
     if (!SelectorEngine.hasQuerySelector || selector.matches(NATIVE_EXCEPTIONS_REGEXP)) {
-      return jsFallbackSelect(selector, ctx);
+      return impl.select(selector, ctx); 
     } else {
       try {
         return SelectorEngine.querySelectorAllImpl(selector, ctx);
       } catch (Exception e) {
-        return jsFallbackSelect(selector, ctx);
+        return impl.select(selector, ctx); 
       }
     }
   }
-  
 }