- expect(20);\r
- ok( $('#text1').attr('value') == "Test", 'Check for value attribute' );\r
- ok( $('#text1').attr('value', "Test2").attr('defaultValue') == "Test", 'Check for defaultValue attribute' );\r
- ok( $('#text1').attr('type') == "text", 'Check for type attribute' );\r
- ok( $('#radio1').attr('type') == "radio", 'Check for type attribute' );\r
- ok( $('#check1').attr('type') == "checkbox", 'Check for type attribute' );\r
- ok( $('#simon1').attr('rel') == "bookmark", 'Check for rel attribute' );\r
- ok( $('#google').attr('title') == "Google!", 'Check for title attribute' );\r
- ok( $('#mark').attr('hreflang') == "en", 'Check for hreflang attribute' );\r
- ok( $('#en').attr('lang') == "en", 'Check for lang attribute' );\r
- ok( $('#simon').attr('class') == "blog link", 'Check for class attribute' );\r
- ok( $('#name').attr('name') == "name", 'Check for name attribute' );\r
- ok( $('#text1').attr('name') == "action", 'Check for name attribute' );\r
- ok( $('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' );\r
- ok( $('#text1').attr('maxlength') == '30', 'Check for maxlength attribute' );\r
- ok( $('#text1').attr('maxLength') == '30', 'Check for maxLength attribute' );\r
- ok( $('#area1').attr('maxLength') == '30', 'Check for maxLength attribute' );\r
- ok( $('#select2').attr('selectedIndex') == 3, 'Check for selectedIndex attribute' );\r
- ok( $('#foo').attr('nodeName') == 'DIV', 'Check for nodeName attribute' );\r
- ok( $('#foo').attr('tagName') == 'DIV', 'Check for tagName attribute' );\r
+ expect(26);\r
+ equals( jQuery('#text1').attr('value'), "Test", 'Check for value attribute' );\r
+ equals( jQuery('#text1').attr('value', "Test2").attr('defaultValue'), "Test", 'Check for defaultValue attribute' );\r
+ equals( jQuery('#text1').attr('type'), "text", 'Check for type attribute' );\r
+ equals( jQuery('#radio1').attr('type'), "radio", 'Check for type attribute' );\r
+ equals( jQuery('#check1').attr('type'), "checkbox", 'Check for type attribute' );\r
+ equals( jQuery('#simon1').attr('rel'), "bookmark", 'Check for rel attribute' );\r
+ equals( jQuery('#google').attr('title'), "Google!", 'Check for title attribute' );\r
+ equals( jQuery('#mark').attr('hreflang'), "en", 'Check for hreflang attribute' );\r
+ equals( jQuery('#en').attr('lang'), "en", 'Check for lang attribute' );\r
+ equals( jQuery('#simon').attr('class'), "blog link", 'Check for class attribute' );\r
+ equals( jQuery('#name').attr('name'), "name", 'Check for name attribute' );\r
+ equals( jQuery('#text1').attr('name'), "action", 'Check for name attribute' );\r
+ ok( jQuery('#form').attr('action').indexOf("formaction") >= 0, 'Check for action attribute' );\r
+ equals( jQuery('#text1').attr('maxlength'), '30', 'Check for maxlength attribute' );\r
+ equals( jQuery('#text1').attr('maxLength'), '30', 'Check for maxLength attribute' );\r
+ equals( jQuery('#area1').attr('maxLength'), '30', 'Check for maxLength attribute' );\r
+ equals( jQuery('#select2').attr('selectedIndex'), 3, 'Check for selectedIndex attribute' );\r
+ equals( jQuery('#foo').attr('nodeName'), 'DIV', 'Check for nodeName attribute' );\r
+ equals( jQuery('#foo').attr('tagName'), 'DIV', 'Check for tagName attribute' );\r
+\r
+ jQuery('<a id="tAnchor5"></a>').attr('href', '#5').appendTo('#main'); // using innerHTML in IE causes href attribute to be serialized to the full path\r
+ equals( jQuery('#tAnchor5').attr('href'), "#5", 'Check for non-absolute href (an anchor)' );\r
+\r
+\r
+ // Related to [5574] and [5683]\r
+ var body = document.body, $body = jQuery(body);\r
+\r
+ ok( $body.attr('foo') === undefined, 'Make sure that a non existent attribute returns undefined' );\r
+ ok( $body.attr('nextSibling') === null, 'Make sure a null expando returns null' );\r