Fix test running in IE.
This commit is contained in:
parent
397d202f54
commit
5f82bdbf1b
@ -28,16 +28,14 @@ jasmine.UPDATE_INTERVAL = 250;
|
||||
*/
|
||||
jasmine.bindOriginal_ = function(base, name) {
|
||||
var original = base[name];
|
||||
return function() {
|
||||
if (original.apply) {
|
||||
return function() {
|
||||
return original.apply(base, arguments);
|
||||
};
|
||||
} else {
|
||||
// IE support
|
||||
if (base == window) {
|
||||
return window[name].apply(window, arguments);
|
||||
return window[name];
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
jasmine.setTimeout = jasmine.bindOriginal_(window, 'setTimeout');
|
||||
|
@ -28,16 +28,14 @@ jasmine.UPDATE_INTERVAL = 250;
|
||||
*/
|
||||
jasmine.bindOriginal_ = function(base, name) {
|
||||
var original = base[name];
|
||||
return function() {
|
||||
if (original.apply) {
|
||||
return function() {
|
||||
return original.apply(base, arguments);
|
||||
};
|
||||
} else {
|
||||
// IE support
|
||||
if (base == window) {
|
||||
return window[name].apply(window, arguments);
|
||||
return window[name];
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
jasmine.setTimeout = jasmine.bindOriginal_(window, 'setTimeout');
|
||||
|
Loading…
Reference in New Issue
Block a user