Skip to content

Commit

Permalink
Restore support for Firefox < 23, Chrome < 28 and Safari 5.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
mgol committed Sep 11, 2013
1 parent 70a1c36 commit 48a3549
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions test/unit/support.js
Expand Up @@ -31,10 +31,11 @@ if ( jQuery.css ) {
} }


(function() { (function() {
var expected, var expected, version,
userAgent = window.navigator.userAgent; userAgent = window.navigator.userAgent;


if ( /chrome/i.test( userAgent ) ) { if ( /chrome/i.test( userAgent ) ) {
version = userAgent.match( /chrome\/(\d+)/i )[ 1 ];
expected = { expected = {
"ajax": true, "ajax": true,
"boxSizingReliable": true, "boxSizingReliable": true,
Expand All @@ -46,7 +47,7 @@ if ( jQuery.css ) {
"noCloneChecked": true, "noCloneChecked": true,
"optDisabled": true, "optDisabled": true,
"optSelected": true, "optSelected": true,
"pixelPosition": true, "pixelPosition": version >= 28,
"radioValue": true, "radioValue": true,
"reliableMarginRight": true "reliableMarginRight": true
}; };
Expand Down Expand Up @@ -114,10 +115,27 @@ if ( jQuery.css ) {
"radioValue": true, "radioValue": true,
"reliableMarginRight": true "reliableMarginRight": true
}; };
} else if ( /5\.1\.\d+ safari/i.test( userAgent ) ) {
expected = {
"ajax":true,
"boxSizingReliable": true,
"checkClone":false,
"checkOn":false,
"clearCloneStyle": true,
"cors":true,
"focusinBubbles":false,
"noCloneChecked":true,
"optDisabled":true,
"optSelected":true,
"pixelPosition": false,
"radioValue":true,
"reliableMarginRight":true
};
} else if ( /firefox/i.test( userAgent ) ) { } else if ( /firefox/i.test( userAgent ) ) {
version = userAgent.match( /firefox\/(\d+)/i )[ 1 ];
expected = { expected = {
"ajax": true, "ajax": true,
"boxSizingReliable": true, "boxSizingReliable": version >= 23,
"checkClone": true, "checkClone": true,
"checkOn": true, "checkOn": true,
"clearCloneStyle": true, "clearCloneStyle": true,
Expand Down

0 comments on commit 48a3549

Please sign in to comment.