From: Jörn Zaefferer Date: Tue, 15 Sep 2009 17:51:38 +0000 (+0000) Subject: remove globals in tests for compability with ?noglobals, to be enabled by default X-Git-Url: http://git.asbjorn.biz/?p=jquery.git;a=commitdiff_plain;h=f55fb36e54eb82b112fa7af2c9b2c28c3a1c38cf remove globals in tests for compability with ?noglobals, to be enabled by default --- diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 564f692..f7c67b7 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -763,7 +763,10 @@ test("jQuery.getJSON - Using Native JSON", function() { stop(); jQuery.getJSON(url("data/json.php"), function(json) { - window.JSON = old; + if (!old) + delete window.JSON + else + window.JSON = old; equals( json, true, "Verifying return value" ); start(); }); diff --git a/test/unit/manipulation.js b/test/unit/manipulation.js index 465686f..541776c 100644 --- a/test/unit/manipulation.js +++ b/test/unit/manipulation.js @@ -626,7 +626,7 @@ var testHtml = function(valueObj) { } ok( pass, "Set HTML" ); - window.debug = false; + delete window.debug; reset(); // using contents will get comments regular, text, and comment nodes