diff options
author | timmywil <tim.willison@thisismedium.com> | 2011-03-29 21:49:37 -0400 |
---|---|---|
committer | timmywil <tim.willison@thisismedium.com> | 2011-04-03 19:13:41 -0400 |
commit | fa4373c11ba10e040a982a641c74f8ff96f312f3 (patch) | |
tree | 120a823850e4aba8bf7496d4929c598845898f2b /test | |
parent | a4d44979c6ecb4be59f1fbb50a0e5eaae804a0d3 (diff) | |
download | jquery-fa4373c11ba10e040a982a641c74f8ff96f312f3.tar.gz jquery-fa4373c11ba10e040a982a641c74f8ff96f312f3.zip |
Add style attribute support tests to $.attr
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/attributes.js | 7 |
1 files changed, 5 insertions, 2 deletions
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("<div/>").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 ) { |