aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorYehuda Katz <wycats@gmail.com>2009-07-13 22:21:40 +0000
committerYehuda Katz <wycats@gmail.com>2009-07-13 22:21:40 +0000
commit89dc1e01435ebeef173c9a843096cd5c1fbc9dd8 (patch)
treeb7e12e87314b98f36859b2b918960631333f24fb /test
parent7cfec99858bf397714d3aac1c0ba4708d2ddb986 (diff)
downloadjquery-89dc1e01435ebeef173c9a843096cd5c1fbc9dd8.tar.gz
jquery-89dc1e01435ebeef173c9a843096cd5c1fbc9dd8.zip
clearQueue and next should now work with default fx on all browsers
Diffstat (limited to 'test')
-rw-r--r--test/unit/data.js31
1 files changed, 7 insertions, 24 deletions
diff --git a/test/unit/data.js b/test/unit/data.js
index 5d390e1a2..812ccd235 100644
--- a/test/unit/data.js
+++ b/test/unit/data.js
@@ -180,22 +180,6 @@ test("queue(name) passes in the next item in the queue as a parameter", function
div.removeData();
});
- expect(1);
-
- var div = jQuery({});
- var counter = 0;
-
- div.queue("foo", function(next) {
- counter++;
- jQuery(this).clearQueue("foo");
- next();
- }).queue("foo", function(next) {
- counter++;
- });
-
- div.dequeue("foo");
-
- equals(counter, 1, "the queue was cleared");
test("queue(name) passes in the next item in the queue as a parameter", function() {
expect(2);
@@ -229,12 +213,10 @@ test("queue() passes in the next item in the queue as a parameter to fx queues",
}).queue(function(next) {
equals(++counter, 2, "Next was called");
next();
- }).queue(function() {
+ }).queue("bar", function() {
equals(++counter, 3, "Other queues are not triggered by next()")
});
- div.dequeue();
-
div.removeData();
});
@@ -255,6 +237,8 @@ test("clearQueue(name) clears the queue", function() {
div.dequeue("foo");
equals(counter, 1, "the queue was cleared");
+
+ div.removeData();
});
test("clearQueue() clears the fx queue", function() {
@@ -265,13 +249,12 @@ test("clearQueue() clears the fx queue", function() {
div.queue(function(next) {
counter++;
- jQuery(this).clearQueue();
- next();
+ setTimeout(function() { jQuery(this).clearQueue(); next(); }, 50);
}).queue(function(next) {
counter++;
});
- div.dequeue();
-
equals(counter, 1, "the queue was cleared");
-})
+
+ div.removeData();
+});