Skip to content
Permalink
Browse files
Browser sniffing is *bad*, folks, even in unit tests.
  • Loading branch information
dmethvin committed Jun 18, 2012
1 parent bab641a commit 90a6a49
Showing 1 changed file with 3 additions and 3 deletions.
@@ -145,7 +145,7 @@ testIframe("offset/relative", "relative", function( jQuery ) {
expect(60);

// IE is collapsing the top margin of 1px
var ie = jQuery.browser.msie && parseInt( jQuery.browser.version, 10 ) < 8;
var ie = document.documentMode && document.documentMode < 8;

// get offset
var tests = [
@@ -206,7 +206,7 @@ testIframe("offset/static", "static", function( jQuery ) {
expect(80);

// IE is collapsing the top margin of 1px
var ie = jQuery.browser.msie && parseInt( jQuery.browser.version, 10 ) < 8;
var ie = document.documentMode && document.documentMode < 8;

// get offset
var tests = [
@@ -349,7 +349,7 @@ testIframe("offset/table", "table", function( jQuery ) {
testIframe("offset/scroll", "scroll", function( jQuery, win ) {
expect(26);

var ie = jQuery.browser.msie && parseInt( jQuery.browser.version, 10 ) < 8;
var ie = document.documentMode && document.documentMode < 8;

// IE is collapsing the top margin of 1px
equal( jQuery("#scroll-1").offset().top, ie ? 6 : 7, "jQuery('#scroll-1').offset().top" );

0 comments on commit 90a6a49

Please sign in to comment.