@@ -474,13 +474,13 @@ QUnit.test( "html(String) tag-hyphenated elements (Bug #1987)", function( assert
474474 jQuery . each ( "thead tbody tfoot colgroup caption tr th td" . split ( " " ) , function ( i , name ) {
475475 var j = jQuery ( "<" + name + "-d></" + name + "-d><" + name + "-d></" + name + "-d>" ) ;
476476 assert . ok ( j [ 0 ] , "Create a tag-hyphenated element" ) ;
477- assert . ok ( jQuery . nodeName ( j [ 0 ] , name . toUpperCase ( ) + "-D" ) , "Hyphenated node name" ) ;
478- assert . ok ( jQuery . nodeName ( j [ 1 ] , name . toUpperCase ( ) + "-D" ) , "Hyphenated node name" ) ;
477+ assert . ok ( j [ 0 ] . nodeName === name . toUpperCase ( ) + "-D" , "Hyphenated node name" ) ;
478+ assert . ok ( j [ 1 ] . nodeName === name . toUpperCase ( ) + "-D" , "Hyphenated node name" ) ;
479479 } ) ;
480480
481481 var j = jQuery ( "<tr-multiple-hyphens><td-with-hyphen>text</td-with-hyphen></tr-multiple-hyphens>" ) ;
482- assert . ok ( jQuery . nodeName ( j [ 0 ] , "TR-MULTIPLE-HYPHENS" ) , "Tags with multiple hyphens" ) ;
483- assert . ok ( jQuery . nodeName ( j . children ( ) [ 0 ] , "TD-WITH-HYPHEN" ) , "Tags with multiple hyphens" ) ;
482+ assert . ok ( j [ 0 ] . nodeName === "TR-MULTIPLE-HYPHENS" , "Tags with multiple hyphens" ) ;
483+ assert . ok ( j . children ( ) [ 0 ] . nodeName === "TD-WITH-HYPHEN" , "Tags with multiple hyphens" ) ;
484484 assert . equal ( j . children ( ) . text ( ) , "text" , "Tags with multiple hyphens behave normally" ) ;
485485} ) ;
486486
@@ -2616,14 +2616,14 @@ QUnit.test( "Make sure specific elements with content created correctly (#13232)
26162616
26172617 jQuery . each ( elems , function ( name , value ) {
26182618 var html = "<" + name + ">" + value + "</" + name + ">" ;
2619- assert . ok ( jQuery . nodeName ( jQuery . parseHTML ( "<" + name + ">" + value + "</" + name + ">" ) [ 0 ] , name ) , name + " is created correctly" ) ;
2619+ assert . ok ( jQuery . parseHTML ( "<" + name + ">" + value + "</" + name + ">" ) [ 0 ] . nodeName . toLowerCase ( ) === name , name + " is created correctly" ) ;
26202620
26212621 results . push ( name ) ;
26222622 args . push ( html ) ;
26232623 } ) ;
26242624
26252625 jQuery . fn . append . apply ( jQuery ( "<div/>" ) , args ) . children ( ) . each ( function ( i ) {
2626- assert . ok ( jQuery . nodeName ( this , results [ i ] ) ) ;
2626+ assert . ok ( this . nodeName . toLowerCase ( ) === results [ i ] ) ;
26272627 } ) ;
26282628} ) ;
26292629
@@ -2634,11 +2634,11 @@ QUnit.test( "Validate creation of multiple quantities of certain elements (#1381
26342634
26352635 jQuery . each ( tags , function ( index , tag ) {
26362636 jQuery ( "<" + tag + "/><" + tag + "/>" ) . each ( function ( ) {
2637- assert . ok ( jQuery . nodeName ( this , tag ) , tag + " empty elements created correctly" ) ;
2637+ assert . ok ( this . nodeName . toLowerCase ( ) === tag , tag + " empty elements created correctly" ) ;
26382638 } ) ;
26392639
26402640 jQuery ( "<" + this + "></" + tag + "><" + tag + "></" + tag + ">" ) . each ( function ( ) {
2641- assert . ok ( jQuery . nodeName ( this , tag ) , tag + " elements with closing tag created correctly" ) ;
2641+ assert . ok ( this . nodeName . toLowerCase ( ) === tag , tag + " elements with closing tag created correctly" ) ;
26422642 } ) ;
26432643 } ) ;
26442644} ) ;
0 commit comments