+\r
+\r
+ // Related to [5574] and [5683]\r
+ var body = document.body, $body = $(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
+ \r
+ body.setAttribute('foo', 'baz');\r
+ equals( $body.attr('foo'), 'baz', 'Make sure the dom attribute is retrieved when no expando is found' );\r
+ \r
+ body.foo = 'bar';\r
+ equals( $body.attr('foo'), 'bar', 'Make sure the expando is preferred over the dom attribute' );\r
+ \r
+ $body.attr('foo','cool');\r
+ equals( $body.attr('foo'), 'cool', 'Make sure that setting works well when both expando and dom attribute are available' );\r
+ \r
+ body.foo = undefined;\r
+ ok( $body.attr('foo') === undefined, 'Make sure the expando is preferred over the dom attribute, even if undefined' );\r
+ \r
+ body.removeAttribute('foo'); // Cleanup\r