name: "Later tests",
"test later(10, null, callback)": function() {
var test = this,
context = (function () { return this; })(),
count = 0,
Y.later(10, null, function () {
count++;
testContext = this;
if (count > 1) {
});
} else {
// Arbitrary timeout to test that the callback
// doesn't execute again
}, 150);
});
}
});
this.wait();
},
"test later(10, obj, callback)": function() {
var test = this,
context = {},
count = 0,
count++;
testContext = this;
if (count > 1) {
});
} else {
// Arbitrary timeout to test that the callback
// doesn't execute again
}, 150);
});
}
});
this.wait();
},
"test later(10, obj, methodString)": function() {
var test = this,
count = 0,
context = {
fn: function () {
count++;
testContext = this;
if (count > 1) {
});
} else {
// Arbitrary timeout to test that the
// callback doesn't execute again
}, 150);
});
}
}
},
this.wait();
},
"test later(10, null, callback, argArray)": function() {
var test = this,
count = 0,
obj = {};
count++;
if (count > 1) {
});
} else {
// Arbitrary timeout to test that the callback
// doesn't execute again
}, 150);
});
}
}, args);
this.wait();
},
"test later(0, null, callback, obj)": function() {
count = 0,
count++;
testData = o;
}, data)
this.wait(function() {
}, 5);
},
"test later(o, null, setTimeout, [fn, 0])": function() {
// fails in IE, YUI 3.3.0 and below
baz;
this.wait(function() {
this.wait(function() {
}, 5);
}, 5);
},
"test cancel later(100, null, callback)": function () {
var count = 0,
this.wait(function () {
this.wait(function () {
}, 250);
}, 20);
},
"test later(10, null, callback, null, true)": function() {
var test = this,
context = (function () { return this; })(),
count = 0,
count++;
testContext = this;
if (count > 1) {
});
}
}, null, true);
this.wait();
},
"test later(10, obj, callback, null, true)": function() {
var test = this,
context = {},
count = 0,
count++;
testContext = this;
if (count > 1) {
});
}
}, null, true);
this.wait();
},
"test later(10, obj, methodString, null, true)": function() {
var test = this,
count = 0,
context = {
fn: function () {
count++;
testContext = this;
if (count > 1) {
});
}
}
},
this.wait();
},
"test later(10, null, callback, argArray, true)": function() {
var test = this,
count = 0,
count++;
if (count === 1) {
} else {
}
});
}, args, true);
this.wait();
},
"test cancel later(10, null, callback, null, true)": function() {
var test = this,
count = 0,
done = false,
count++;
if (done) {
});
} else if (count > 1) {
done = true;
// Arbitrary timeout to test the callback doesn't
// execute again
}, 300);
});
}
}, null, true);
this.wait();
}
}));
});