X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcss.js;h=f50a21c1c949fa2e649889e660c7591e1bf4272b;hb=148fb7ba8e992dd70c64cdc6a1c6f643fd1ba160;hp=76274752e420cf1a1f475b00fd052d855d1bd213;hpb=aae0617c834a030902cd8da2714f852d6a1431be;p=jquery.git diff --git a/test/unit/css.js b/test/unit/css.js index 7627475..f50a21c 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -1,7 +1,7 @@ module("css"); test("css(String|Hash)", function() { - expect(27); + expect(28); equals( jQuery('#main').css("display"), 'none', 'Check for css property "display"'); @@ -12,6 +12,8 @@ test("css(String|Hash)", function() { ok( jQuery('#nothiddendiv').is(':visible'), 'Modified CSS display: Assert element is visible'); // handle negative numbers by ignoring #1599, #4216 + jQuery('#nothiddendiv').css({ 'width': 1, 'height': 1 }); + var width = parseFloat(jQuery('#nothiddendiv').css('width')), height = parseFloat(jQuery('#nothiddendiv').css('height')); jQuery('#nothiddendiv').css({ width: -1, height: -1 }); equals( parseFloat(jQuery('#nothiddendiv').css('width')), width, 'Test negative width ignored') @@ -56,6 +58,8 @@ test("css(String|Hash)", function() { } equals( prctval, checkval, "Verify fontSize % set." ); + + equals( typeof child.css("width"), "string", "Make sure that a string width is returned from css('width')." ); }); test("css(String, Object)", function() {