Skip to content

Commit 48a3549

Browse files
committed
Restore support for Firefox < 23, Chrome < 28 and Safari 5.1.
1 parent 70a1c36 commit 48a3549

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

test/unit/support.js

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,11 @@ if ( jQuery.css ) {
3131
}
3232

3333
(function() {
34-
var expected,
34+
var expected, version,
3535
userAgent = window.navigator.userAgent;
3636

3737
if ( /chrome/i.test( userAgent ) ) {
38+
version = userAgent.match( /chrome\/(\d+)/i )[ 1 ];
3839
expected = {
3940
"ajax": true,
4041
"boxSizingReliable": true,
@@ -46,7 +47,7 @@ if ( jQuery.css ) {
4647
"noCloneChecked": true,
4748
"optDisabled": true,
4849
"optSelected": true,
49-
"pixelPosition": true,
50+
"pixelPosition": version >= 28,
5051
"radioValue": true,
5152
"reliableMarginRight": true
5253
};
@@ -114,10 +115,27 @@ if ( jQuery.css ) {
114115
"radioValue": true,
115116
"reliableMarginRight": true
116117
};
118+
} else if ( /5\.1\.\d+ safari/i.test( userAgent ) ) {
119+
expected = {
120+
"ajax":true,
121+
"boxSizingReliable": true,
122+
"checkClone":false,
123+
"checkOn":false,
124+
"clearCloneStyle": true,
125+
"cors":true,
126+
"focusinBubbles":false,
127+
"noCloneChecked":true,
128+
"optDisabled":true,
129+
"optSelected":true,
130+
"pixelPosition": false,
131+
"radioValue":true,
132+
"reliableMarginRight":true
133+
};
117134
} else if ( /firefox/i.test( userAgent ) ) {
135+
version = userAgent.match( /firefox\/(\d+)/i )[ 1 ];
118136
expected = {
119137
"ajax": true,
120-
"boxSizingReliable": true,
138+
"boxSizingReliable": version >= 23,
121139
"checkClone": true,
122140
"checkOn": true,
123141
"clearCloneStyle": true,

0 commit comments

Comments
 (0)