From dd5e97bf140d8c1c2e37165c81008e06dd6a031f Mon Sep 17 00:00:00 2001 From: "Fabio M. Costa" Date: Wed, 23 Dec 2009 08:46:50 -0200 Subject: [PATCH] with this fix jasmine runs on ie6 (cherry picked from commit 33a3b769e2b28aab01c1d6ee216c55e12539f417) --- src/base.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/base.js b/src/base.js index 8850f28..391412f 100755 --- a/src/base.js +++ b/src/base.js @@ -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