From: timmywil Date: Wed, 30 Mar 2011 01:49:37 +0000 (-0400) Subject: Add style attribute support tests to $.attr X-Git-Tag: 1.6b1~27^2~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fa4373c11ba10e040a982a641c74f8ff96f312f3;p=jquery.git Add style attribute support tests to $.attr --- diff --git a/test/unit/attributes.js b/test/unit/attributes.js index 0260a6c1f..262f3499e 100644 --- a/test/unit/attributes.js +++ b/test/unit/attributes.js @@ -75,7 +75,7 @@ test("prop(String, Object)", function() { }); test("attr(String)", function() { - expect(26); + expect(28); equals( jQuery('#text1').attr('type'), "text", 'Check for type attribute' ); equals( jQuery('#radio1').attr('type'), "radio", 'Check for type attribute' ); @@ -127,7 +127,10 @@ test("attr(String)", function() { ok( jQuery("
").attr("doesntexist") === undefined, "Make sure undefined is returned when no attribute is found." ); ok( jQuery().attr("doesntexist") === undefined, "Make sure undefined is returned when no element is there." ); - + + // Check for style support + ok( !!~jQuery('#dl').attr('style').indexOf('absolute'), 'Check style attribute getter' ); + ok( !!~jQuery('#foo').attr('style', 'position:absolute;').attr('style').indexOf('absolute'), 'Check style setter' ); }); if ( !isLocal ) {