diff options
author | jeresig <jeresig@gmail.com> | 2009-12-16 17:08:10 -0500 |
---|---|---|
committer | jeresig <jeresig@gmail.com> | 2009-12-16 17:08:10 -0500 |
commit | de659859333c4e1a7840cc8d43765f47fcf53e9f (patch) | |
tree | 0448e449ac38c879d8ca71b4e0f8f0384ede62ec /test | |
parent | f078e930edb25190bb04c682ad067b72331b6e69 (diff) | |
download | jquery-de659859333c4e1a7840cc8d43765f47fcf53e9f.tar.gz jquery-de659859333c4e1a7840cc8d43765f47fcf53e9f.zip |
Make sure that some height/width is set for the nothiddendiv before checking.
Diffstat (limited to 'test')
-rw-r--r-- | test/unit/css.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/unit/css.js b/test/unit/css.js index 5e88254d7..f50a21c1c 100644 --- a/test/unit/css.js +++ b/test/unit/css.js @@ -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') |