Skip to content
Permalink
Browse files

Tweaked a CSS test to handle differences in font-size % support in br…

…owsers.
  • Loading branch information
jeresig committed Dec 3, 2009
1 parent 9d6c4d8 commit 8a33a855b588bc398f31f971eb4b3c2f4cac84f7
Showing with 8 additions and 1 deletion.
  1. +8 −1 test/unit/css.js
@@ -47,8 +47,15 @@ test("css(String|Hash)", function() {
child.attr("class", "em");
equals( parseInt(child.css("fontSize")), 32, "Verify fontSize em set." );

// Have to verify this as the result depends upon the browser's CSS
// support for font-size percentages
child.attr("class", "prct");
equals( parseInt(child.css("fontSize")), 24, "Verify fontSize % set." );
var prctval = parseInt(child.css("fontSize")), checkval = 0;
if ( prctval === 16 || prctval === 24 ) {
checkval = prctval;
}

equals( prctval, checkval, "Verify fontSize % set." );
});

test("css(String, Object)", function() {

0 comments on commit 8a33a85

Please sign in to comment.
You can’t perform that action at this time.