aboutsummaryrefslogtreecommitdiffstats
path: root/gwtquery-core
diff options
context:
space:
mode:
authorManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2013-02-27 20:57:27 +0100
committerManuel Carrasco Moñino <manuel.carrasco.m@gmail.com>2013-02-27 20:57:27 +0100
commitb53d0bf7af56dc44cecbf6d58529855fd54a74a0 (patch)
tree90843c98f85758d15f1e81119cfcbc1d94241619 /gwtquery-core
parent21ebc50445074ac48899a309be6341be0421c6ea (diff)
downloadgwtquery-b53d0bf7af56dc44cecbf6d58529855fd54a74a0.tar.gz
gwtquery-b53d0bf7af56dc44cecbf6d58529855fd54a74a0.zip
Test callbacks disable method
Diffstat (limited to 'gwtquery-core')
-rw-r--r--gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/callbacks/Callbacks.java2
-rw-r--r--gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/callbacks/Callbacks.java b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/callbacks/Callbacks.java
index 58992a4e..a91379ab 100644
--- a/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/callbacks/Callbacks.java
+++ b/gwtquery-core/src/main/java/com/google/gwt/query/client/plugins/callbacks/Callbacks.java
@@ -120,7 +120,7 @@ public class Callbacks {
*/
public Callbacks disable() {
callbacks = JsObjectArray.create();
- memory = JsObjectArray.create();
+ memory = null;
done = true;
return this;
}
diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java
index 3f5919a5..9bcc4884 100644
--- a/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java
+++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java
@@ -136,6 +136,10 @@ public class GQueryDeferredTestGwt extends GWTTestCase {
callbacks.remove( fn1 );
callbacks.add( fn1 );
assertEquals(" f1: bar f2: bar f2: bar f1: bar", result);
+ callbacks.remove( fn1 );
+ callbacks.disable();
+ callbacks.add( fn1 );
+ assertEquals(" f1: bar f2: bar f2: bar f1: bar", result);
}
}