Fix test running in IE.

This commit is contained in:
Christian Williams 2009-10-19 17:29:33 -07:00
parent 397d202f54
commit 5f82bdbf1b
2 changed files with 2034 additions and 2038 deletions

File diff suppressed because it is too large Load Diff

View File

@ -28,16 +28,14 @@ jasmine.UPDATE_INTERVAL = 250;
*/ */
jasmine.bindOriginal_ = function(base, name) { jasmine.bindOriginal_ = function(base, name) {
var original = base[name]; var original = base[name];
return function() { if (original.apply) {
if (original.apply) { return function() {
return original.apply(base, arguments); return original.apply(base, arguments);
} else { };
//IE support } else {
if (base == window) { // IE support
return window[name].apply(window, arguments); return window[name];
} }
}
};
}; };
jasmine.setTimeout = jasmine.bindOriginal_(window, 'setTimeout'); jasmine.setTimeout = jasmine.bindOriginal_(window, 'setTimeout');