X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=test%2Funit%2Fcss.js;h=8ae8fcb346848b8c028951dd3ecc99c373e2494f;hb=ef0157d19138471b497b8575e56df428e0986a7c;hp=3e65b51315918e4230f66a121c6069e2bd620a3e;hpb=9bd9d270f69582b119b1835da4419a900f975b6b;p=jquery.git diff --git a/test/unit/css.js b/test/unit/css.js index 3e65b51..8ae8fcb 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -1,4 +1,4 @@ -module("css"); +module("css", { teardown: moduleTeardown }); test("css(String|Hash)", function() { expect(41); @@ -323,22 +323,25 @@ test(":visible selector works properly on children with a hidden parent (bug #45 test("internal ref to elem.runtimeStyle (bug #7608)", function () { expect(1); - - var result = true, - val = 10; + var result = true; - jQuery('
' + - '
 
').appendTo("#main"); - try { - // the bug is located within src/css.js - jQuery("#bug7608 #test").animate( { width: val }, 1000); - + jQuery("#foo").css( { width: "0%" } ).css("width"); } catch (e) { result = false; } ok( result, "elem.runtimeStyle does not throw exception" ); - - jQuery("#bug7608").remove(); +}); + +test("marginRight computed style (bug #3333)", function() { + expect(1); + + var $div = jQuery("#foo"); + $div.css({ + width: "1px", + marginRight: 0 + }); + + equals($div.css("marginRight"), "0px"); });