X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=c8c7cad7ad5371e80f9f8a42466cb6fb2d04e528;hb=4e7d565e50b4705f1daed7100937591330af34c4;hp=7942548692b0bce7ce9f94426a54aa01238b5288;hpb=96152559e0e2fa1afc70f8994e664f5805aebad5;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index 7942548..c8c7cad 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -401,8 +401,8 @@ test("attr(String)", function() { equals( jQuery('#text1').attr('maxLength'), '30', 'Check for maxLength attribute' ); equals( jQuery('#area1').attr('maxLength'), '30', 'Check for maxLength attribute' ); equals( jQuery('#select2').attr('selectedIndex'), 3, 'Check for selectedIndex attribute' ); - equals( jQuery('#foo').attr('nodeName'), 'DIV', 'Check for nodeName attribute' ); - equals( jQuery('#foo').attr('tagName'), 'DIV', 'Check for tagName attribute' ); + equals( jQuery('#foo').attr('nodeName').toUpperCase(), 'DIV', 'Check for nodeName attribute' ); + equals( jQuery('#foo').attr('tagName').toUpperCase(), 'DIV', 'Check for tagName attribute' ); jQuery('').attr('href', '#5').appendTo('#main'); // using innerHTML in IE causes href attribute to be serialized to the full path equals( jQuery('#tAnchor5').attr('href'), "#5", 'Check for non-absolute href (an anchor)' ); @@ -778,8 +778,8 @@ test("wrap(String|Element)", function() { // Try wrapping a disconnected node j = jQuery("").wrap("
"); - equals( j[0].nodeName, "LABEL", "Element is a label" ); - equals( j[0].parentNode.nodeName, "LI", "Element has been wrapped" ); + equals( j[0].nodeName.toUpperCase(), "LABEL", "Element is a label" ); + equals( j[0].parentNode.nodeName.toUpperCase(), "LI", "Element has been wrapped" ); }); test("wrapAll(String|Element)", function() { @@ -1377,7 +1377,7 @@ test("html(String)", function() { // this is needed, or the expando added by jQuery unique will yield a different html j.find('b').removeData(); - equals( j.html().toLowerCase(), "bold", "Check node,textnode,comment with html()" ); + equals( j.html().replace(/ xmlns="[^"]+"/g, "").toLowerCase(), "bold", "Check node,textnode,comment with html()" ); jQuery("#main").html(""); jQuery("#main select").html(""); @@ -1791,7 +1791,7 @@ test("contents()", function() { test("jQuery.makeArray", function(){ expect(15); - equals( jQuery.makeArray(jQuery('html>*'))[0].nodeName, "HEAD", "Pass makeArray a jQuery object" ); + equals( jQuery.makeArray(jQuery('html>*'))[0].nodeName.toUpperCase(), "HEAD", "Pass makeArray a jQuery object" ); equals( jQuery.makeArray(document.getElementsByName("PWD")).slice(0,1)[0].name, "PWD", "Pass makeArray a nodelist" ); @@ -1807,7 +1807,7 @@ test("jQuery.makeArray", function(){ equals( jQuery.makeArray( true )[0].constructor, Boolean, "Pass makeArray a boolean" ); - equals( jQuery.makeArray( document.createElement("div") )[0].nodeName, "DIV", "Pass makeArray a single node" ); + equals( jQuery.makeArray( document.createElement("div") )[0].nodeName.toUpperCase(), "DIV", "Pass makeArray a single node" ); equals( jQuery.makeArray( {length:2, 0:"a", 1:"b"} ).join(""), "ab", "Pass makeArray an array like map (with length)" );