Add a test to check that defer handles arguments correctly

This commit is contained in:
Thomas Fuchs 2007-11-23 11:55:42 +00:00
parent 23823048d1
commit 6e080aa186
1 changed files with 8 additions and 1 deletions

View File

@ -213,9 +213,16 @@
window.deferred = undefined;
var deferredFunction = function() { window.deferred = true; };
deferredFunction.defer();
assertUndefined(window.deferred);
assertUndefined(window.deferred);
wait(50, function() {
assert(window.deferred);
window.deferredValue = 0;
var deferredFunction2 = function(arg) { window.deferredValue = arg; };
deferredFunction2.defer('test');
wait(50, function() {
assertEqual('test', window.deferredValue);
});
});
}},