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
1 changed files with 2 additions and 4 deletions

View File

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