with this fix jasmine runs on ie6

(cherry picked from commit 33a3b769e2b28aab01c1d6ee216c55e12539f417)
This commit is contained in:
Fabio M. Costa 2009-12-23 08:46:50 -02:00 committed by ragaskar
parent d90852336f
commit dd5e97bf14

View File

@ -501,10 +501,8 @@ var xdescribe = function(description, specDefinitions) {
};
jasmine.XmlHttpRequest = XMLHttpRequest;
// Provide the XMLHttpRequest class for IE 5.x-6.x:
if (typeof XMLHttpRequest == "undefined") jasmine.XmlHttpRequest = function() {
jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() {
try {
return new ActiveXObject("Msxml2.XMLHTTP.6.0");
} catch(e) {
@ -522,7 +520,7 @@ if (typeof XMLHttpRequest == "undefined") jasmine.XmlHttpRequest = function() {
} catch(e) {
}
throw new Error("This browser does not support XMLHttpRequest.");
};
} : XMLHttpRequest;
/**
* Adds suite files to an HTML document so that they are executed, thus adding them to the current