X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fajax.js;h=d827a15300d8110eccc14014f8f9f9c9dc3066aa;hb=c7d640f000c6945a238aa99952b4b1b378775d7e;hp=1fcf5ea198be4f0364075f6109ee650369fb9fdd;hpb=6a722e251dedd5f01ac0c46e330a368be7bb760b;p=jquery.git diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 1fcf5ea..d827a15 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -74,7 +74,7 @@ test("Ajax events with context", function() { expect(6); stop(); - var context = {}; + var context = document.createElement("div"); function event(e){ equals( this, context, e.type ); @@ -785,12 +785,9 @@ test("jQuery.getJSON - Using Native JSON", function() { stop(); jQuery.getJSON(url("data/json.php"), function(json) { - if (!old) - delete window.JSON - else - window.JSON = old; - equals( json, true, "Verifying return value" ); - start(); + window.JSON = old; + equals( json, true, "Verifying return value" ); + start(); }); });