diff options
author | Manolo Carrasco <manolo@apache.org> | 2011-04-23 09:41:23 +0000 |
---|---|---|
committer | Manolo Carrasco <manolo@apache.org> | 2011-04-23 09:41:23 +0000 |
commit | 097e48fc77124b5183e169b27c016587478fa4fb (patch) | |
tree | eb9e86f23b0d7c72d5c667827e8909217433e2dd /devtest | |
parent | 29e01cd1d1d2dd37e86f011fbfcd647e29637262 (diff) | |
download | gwtquery-097e48fc77124b5183e169b27c016587478fa4fb.tar.gz gwtquery-097e48fc77124b5183e169b27c016587478fa4fb.zip |
more tests
Diffstat (limited to 'devtest')
-rw-r--r-- | devtest/src/main/java/com/google/gwt/query/client/DevTestRunner.java | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/devtest/src/main/java/com/google/gwt/query/client/DevTestRunner.java b/devtest/src/main/java/com/google/gwt/query/client/DevTestRunner.java index 48d0f053..1ce3966b 100644 --- a/devtest/src/main/java/com/google/gwt/query/client/DevTestRunner.java +++ b/devtest/src/main/java/com/google/gwt/query/client/DevTestRunner.java @@ -25,6 +25,7 @@ import com.google.gwt.event.dom.client.FocusHandler; import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.google.gwt.query.client.js.JsCache;
+import com.google.gwt.query.client.js.JsNodeArray;
import com.google.gwt.query.client.js.JsUtils;
import com.google.gwt.query.client.plugins.effects.PropertiesAnimation;
import com.google.gwt.query.client.plugins.effects.PropertiesAnimation.Easing;
@@ -52,13 +53,35 @@ public class DevTestRunner extends MyTestCase implements EntryPoint { public void onModuleLoad() {
try {
gwtSetUp();
- testCompareJquery();
+ testChrome__gwt_ObjectId();
} catch (Exception ex) {
ex.printStackTrace();
$(e).html("").after("<div>ERROR: " + ex.getMessage() + "</div>");
}
}
+ public void testChrome__gwt_ObjectId() {
+ JsCache a = JsCache.create();
+ assertEquals(0, a.length());
+ assertEquals(0, a.keys().length);
+ assertEquals(0, a.elements().length);
+
+ a.put("obj", new Long(21));
+ assertEquals(1, a.length());
+ assertEquals(1, a.keys().length);
+ assertEquals(1, a.elements().length);
+
+ JsNodeArray n = JsNodeArray.create();
+ assertEquals(0, n.getLength());
+ assertEquals(0, n.<JsCache>cast().keys().length);
+ assertEquals(0, n.elements().length);
+
+ n.addNode($("<hr/>").get(0));
+ assertEquals(1, n.getLength());
+ assertEquals(1, n.<JsCache>cast().keys().length);
+ assertEquals(1, n.elements().length);
+ }
+
public void testJsCache() {
String[] slist = new String[]{"A", "B", "C"};
|