Skip to content
Permalink
Browse files

Add style attribute support tests to $.attr

  • Loading branch information
timmywil
timmywil committed Mar 30, 2011
1 parent a4d4497 commit fa4373c11ba10e040a982a641c74f8ff96f312f3
Showing with 5 additions and 2 deletions.
  1. +5 −2 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 ) {

0 comments on commit fa4373c

Please sign in to comment.
You can’t perform that action at this time.