Skip to content

Commit 7e70867

Browse files
committed
Support: Re-organize browser order, add Safari 8
Most browsers were put in order newest to oldest, Android was treated differently; this has been fixed. Also, browsers that share test results between different versions were grouped together. (refs 43faf6d)
1 parent 4cc4e54 commit 7e70867

File tree

1 file changed

+9
-67
lines changed

1 file changed

+9
-67
lines changed

test/unit/support.js

Lines changed: 9 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -99,36 +99,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
9999
"style": true,
100100
"submitBubbles": true
101101
};
102-
} else if ( /trident\/7\.0/i.test( userAgent ) ) {
103-
expected = {
104-
"ajax": true,
105-
"boxSizingReliable": false,
106-
"changeBubbles": true,
107-
"checkClone": true,
108-
"checkOn": true,
109-
"clearCloneStyle": false,
110-
"cors": true,
111-
"cssFloat": true,
112-
"deleteExpando": true,
113-
"focusinBubbles": true,
114-
"html5Clone": true,
115-
"htmlSerialize": true,
116-
"input": true,
117-
"leadingWhitespace": true,
118-
"noCloneChecked": false,
119-
"noCloneEvent": true,
120-
"opacity": true,
121-
"optDisabled": true,
122-
"optSelected": false,
123-
"ownLast": false,
124-
"pixelPosition": true,
125-
"radioValue": false,
126-
"reliableHiddenOffsets": true,
127-
"reliableMarginRight": true,
128-
"style": true,
129-
"submitBubbles": true
130-
};
131-
} else if ( /msie 10\.0/i.test( userAgent ) ) {
102+
} else if ( /(msie 10\.0|trident\/7\.0)/i.test( userAgent ) ) {
132103
expected = {
133104
"ajax": true,
134105
"boxSizingReliable": false,
@@ -215,7 +186,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
215186
"style": false,
216187
"submitBubbles": false
217188
};
218-
} else if ( /7\.0(\.\d+|) safari/i.test( userAgent ) ) {
189+
} else if ( /(6|7|8)\.0(\.\d+|) safari/i.test( userAgent ) ) {
219190
expected = {
220191
"ajax": true,
221192
"boxSizingReliable": true,
@@ -244,7 +215,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
244215
"style": true,
245216
"submitBubbles": true
246217
};
247-
} else if ( /6\.0(\.\d+|) safari/i.test( userAgent ) ) {
218+
} else if ( /firefox/i.test( userAgent ) ) {
248219
expected = {
249220
"ajax": true,
250221
"boxSizingReliable": true,
@@ -266,14 +237,14 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
266237
"optDisabled": true,
267238
"optSelected": true,
268239
"ownLast": false,
269-
"pixelPosition": false,
240+
"pixelPosition": true,
270241
"radioValue": true,
271242
"reliableHiddenOffsets": true,
272243
"reliableMarginRight": true,
273244
"style": true,
274245
"submitBubbles": true
275246
};
276-
} else if ( /firefox/i.test( userAgent ) ) {
247+
} else if ( /iphone os/i.test( userAgent ) ) {
277248
expected = {
278249
"ajax": true,
279250
"boxSizingReliable": true,
@@ -295,20 +266,20 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
295266
"optDisabled": true,
296267
"optSelected": true,
297268
"ownLast": false,
298-
"pixelPosition": true,
269+
"pixelPosition": false,
299270
"radioValue": true,
300271
"reliableHiddenOffsets": true,
301272
"reliableMarginRight": true,
302273
"style": true,
303274
"submitBubbles": true
304275
};
305-
} else if ( /iphone os/i.test( userAgent ) ) {
276+
} else if ( /android 4\.[0-3]/i.test( userAgent ) ) {
306277
expected = {
307278
"ajax": true,
308279
"boxSizingReliable": true,
309280
"changeBubbles": true,
310-
"checkClone": true,
311-
"checkOn": true,
281+
"checkClone": false,
282+
"checkOn": false,
312283
"clearCloneStyle": true,
313284
"cors": true,
314285
"cssFloat": true,
@@ -360,35 +331,6 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
360331
"style": true,
361332
"submitBubbles": true
362333
};
363-
} else if ( /android 4\.[0-3]/i.test( userAgent ) ) {
364-
expected = {
365-
"ajax": true,
366-
"boxSizingReliable": true,
367-
"changeBubbles": true,
368-
"checkClone": false,
369-
"checkOn": false,
370-
"clearCloneStyle": true,
371-
"cors": true,
372-
"cssFloat": true,
373-
"deleteExpando": true,
374-
"focusinBubbles": false,
375-
"html5Clone": true,
376-
"htmlSerialize": true,
377-
"input": true,
378-
"leadingWhitespace": true,
379-
"noCloneChecked": true,
380-
"noCloneEvent": true,
381-
"opacity": true,
382-
"optDisabled": true,
383-
"optSelected": true,
384-
"ownLast": false,
385-
"pixelPosition": false,
386-
"radioValue": true,
387-
"reliableHiddenOffsets": true,
388-
"reliableMarginRight": true,
389-
"style": true,
390-
"submitBubbles": true
391-
};
392334
}
393335

394336
if ( expected ) {

0 commit comments

Comments
 (0)