git.asbjorn.biz
/
jquery.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
f078e93
)
Make sure that some height/width is set for the nothiddendiv before checking.
author
jeresig
<jeresig@gmail.com>
Wed, 16 Dec 2009 22:08:10 +0000
(17:08 -0500)
committer
jeresig
<jeresig@gmail.com>
Wed, 16 Dec 2009 22:08:10 +0000
(17:08 -0500)
test/unit/css.js
patch
|
blob
|
history
diff --git
a/test/unit/css.js
b/test/unit/css.js
index
5e88254
..
f50a21c
100644
(file)
--- 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
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')
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')