X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=test%2Funit%2Fcore.js;h=cea8c61e3966b684bc053a44f5da21419ed11861;hb=0a755f6ab38d36ffda02f9ff5a6d606c24a94baa;hp=229ad2ac494b2143738439e6ca4d6c7285f07aa5;hpb=2ccd2cb36be6169afee3bd6e82ba3539f432c73f;p=jquery.git diff --git a/test/unit/core.js b/test/unit/core.js index 229ad2a..cea8c61 100644 --- a/test/unit/core.js +++ b/test/unit/core.js @@ -410,6 +410,15 @@ test("jQuery.css(elem, 'height') doesn't clear radio buttons (bug #1095)", funct ok( ! $(":checkbox:last", $checkedtest).attr("checked"), "Check last checkbox still NOT checked." ); }); +test("width()", function() { + expect(2); + + $("#nothiddendiv").width(30); + equals($("#nothiddendiv").width(), 30, "Test set to 30 correctly"); + $("#nothiddendiv").width(-1); // handle negative numbers by ignoring #1599 + equals($("#nothiddendiv").width(), 30, "Test negative width ignored"); +}); + test("text()", function() { expect(1); var expected = "This link has class=\"blog\": Simon Willison's Weblog";