X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcss.js;h=2c2e9ed212a1af631e254eaba902c2cdf5ee976a;hb=7e02cee5ff8b5e9117366d7b43af7b5794f0f258;hp=ed8f919a85e92f5d397d9049e812cb7c09dc5f16;hpb=e4a38670b10b1ce776afff389bae34991e986180;p=jquery.git
diff --git a/test/unit/css.js b/test/unit/css.js
index ed8f919..2c2e9ed 100644
--- a/test/unit/css.js
+++ b/test/unit/css.js
@@ -1,7 +1,7 @@
module("css");
test("css(String|Hash)", function() {
- expect(42);
+ expect(41);
equals( jQuery('#main').css("display"), 'block', 'Check for css property "display"');
@@ -13,21 +13,21 @@ test("css(String|Hash)", function() {
var div = jQuery( "
" );
- equals( div.css("width"), "0px", "Width on disconnected node." );
- equals( div.css("height"), "0px", "Height on disconnected node." );
+ equals( div.css("width") || "auto", "auto", "Width on disconnected node." );
+ equals( div.css("height") || "auto", "auto", "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( "
").appendTo("body");
+ var div2 = jQuery( "
").appendTo("body");
- equals( div2.find("input").css("width"), "0px", "Width on hidden input." );
- equals( div2.find("input").css("height"), "0px", "Height on hidden input." );
+ equals( div2.find("input").css("height"), "20px", "Height on hidden input." );
+ equals( div2.find("textarea").css("height"), "20px", "Height on hidden textarea." );
+ equals( div2.find("div").css("height"), "20px", "Height on hidden textarea." );
- equals( div2.find("textarea").css("width"), "0px", "Width on hidden textarea." );
- equals( div2.find("textarea").css("height"), "0px", "Height on hidden textarea." );
+ div2.remove();
// handle negative numbers by ignoring #1599, #4216
jQuery('#nothiddendiv').css({ 'width': 1, 'height': 1 });