diff options
author | Manuel Carrasco Moñino <manuel.carrasco.m@gmail.com> | 2013-02-27 20:57:27 +0100 |
---|---|---|
committer | Manuel Carrasco Moñino <manuel.carrasco.m@gmail.com> | 2013-02-27 20:57:27 +0100 |
commit | b53d0bf7af56dc44cecbf6d58529855fd54a74a0 (patch) | |
tree | 90843c98f85758d15f1e81119cfcbc1d94241619 /gwtquery-core | |
parent | 21ebc50445074ac48899a309be6341be0421c6ea (diff) | |
download | gwtquery-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.java | 2 | ||||
-rw-r--r-- | gwtquery-core/src/test/java/com/google/gwt/query/client/GQueryDeferredTestGwt.java | 4 |
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); } } |