X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcss.js;h=555f135756f887a9814ceeb22ebe549819e6c534;hb=2e2d5e9db5ee9886644d75954d327e6d284e2da8;hp=b6063b70cc906caa54386318db95104fd6fc08b0;hpb=8fb4d9af74d61e4bc55e615a21115c48bf5f65d9;p=jquery.git diff --git a/test/unit/css.js b/test/unit/css.js index b6063b7..555f135 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -1,7 +1,7 @@ -module("css"); +module("css", { teardown: moduleTeardown }); test("css(String|Hash)", function() { - expect(34); + expect(41); equals( jQuery('#main').css("display"), 'block', 'Check for css property "display"'); @@ -11,6 +11,26 @@ test("css(String|Hash)", function() { jQuery('#nothiddendiv').css({display: 'block'}); ok( jQuery('#nothiddendiv').is(':visible'), 'Modified CSS display: Assert element is visible'); + var div = jQuery( "
" ); + + // These should be "auto" (or some better value) + // temporarily provide "0px" for backwards compat + equals( div.css("width"), "0px", "Width on disconnected node." ); + equals( div.css("height"), "0px", "Height on disconnected node." ); + + div.css({ width: 4, height: 4 }); + + equals( div.css("width"), "4px", "Width on disconnected node." ); + equals( div.css("height"), "4px", "Height on disconnected node." ); + + var div2 = jQuery( "