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 90a6a493e4aed3e2eb67c233a0374260487cf0a4
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/unit/offset.js
@@ -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.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.