remove globals in tests for compability with ?noglobals, to be enabled by default
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Tue, 15 Sep 2009 17:51:38 +0000 (17:51 +0000)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Tue, 15 Sep 2009 17:51:38 +0000 (17:51 +0000)
test/unit/ajax.js
test/unit/manipulation.js

index 564f692..f7c67b7 100644 (file)
@@ -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();
        });
index 465686f..541776c 100644 (file)
@@ -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