Fixed a bug with $("body") in dynamic documents, refactored $(...), stopped the test...
[jquery.git] / src / jquery / coreTest.js
index 78d4a27..4b29c8f 100644 (file)
@@ -107,19 +107,21 @@ test("attr(String, Object)", function() {
        ok( document.getElementById('text1').readOnly == false, 'Set readonly attribute' );\r
 });\r
 \r
-test("attr(String, Object)x", function() {\r
-       expect(2);\r
-       stop();\r
-       $.get('data/dashboard.xml', function(xml) { \r
-         var titles = [];\r
-         $('tab', xml).each(function() {\r
-           titles.push($(this).attr('title'));\r
-         });\r
-         ok( titles[0] == 'Location', 'attr() in XML context: Check first title' );\r
-         ok( titles[1] == 'Users', 'attr() in XML context: Check second title' );\r
-         start();\r
+if ( location.protocol != "file:" ) {\r
+       test("attr(String, Object)x", function() {\r
+               expect(2);\r
+               stop();\r
+               $.get('data/dashboard.xml', function(xml) { \r
+               var titles = [];\r
+               $('tab', xml).each(function() {\r
+               titles.push($(this).attr('title'));\r
+               });\r
+               ok( titles[0] == 'Location', 'attr() in XML context: Check first title' );\r
+               ok( titles[1] == 'Users', 'attr() in XML context: Check second title' );\r
+               start();\r
+               });\r
        });\r
-});\r
+}\r
 \r
 test("css(String|Hash)", function() {\r
        expect(8);\r