Skip to content

Commit

Permalink
Support: Re-organize browser order, add Safari 8
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mgol committed Dec 9, 2014
1 parent eeda11c commit 43faf6d
Showing 1 changed file with 9 additions and 41 deletions.
50 changes: 9 additions & 41 deletions test/unit/support.js
Expand Up @@ -69,23 +69,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableMarginRight": true
};
} else if ( /trident\/7\.0/i.test( userAgent ) ) {
expected = {
"ajax": true,
"boxSizingReliable": false,
"checkClone": true,
"checkOn": true,
"clearCloneStyle": false,
"cors": true,
"focusinBubbles": true,
"noCloneChecked": false,
"optDisabled": true,
"optSelected": false,
"pixelPosition": true,
"radioValue": false,
"reliableMarginRight": true
};
} else if ( /msie 10\.0/i.test( userAgent ) ) {
} else if ( /(msie 10\.0|trident\/7\.0)/i.test( userAgent ) ) {
expected = {
"ajax": true,
"boxSizingReliable": false,
Expand Down Expand Up @@ -117,7 +101,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": false,
"reliableMarginRight": true
};
} else if ( /7\.0(\.\d+|) safari/i.test( userAgent ) ) {
} else if ( /(6|7|8)\.0(\.\d+|) safari/i.test( userAgent ) ) {
expected = {
"ajax": true,
"boxSizingReliable": true,
Expand All @@ -133,7 +117,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableMarginRight": true
};
} else if ( /6\.0(\.\d+|) safari/i.test( userAgent ) ) {
} else if ( /firefox/i.test( userAgent ) ) {
expected = {
"ajax": true,
"boxSizingReliable": true,
Expand All @@ -145,11 +129,11 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"noCloneChecked": true,
"optDisabled": true,
"optSelected": true,
"pixelPosition": false,
"pixelPosition": true,
"radioValue": true,
"reliableMarginRight": true
};
} else if ( /firefox/i.test( userAgent ) ) {
} else if ( /iphone os/i.test( userAgent ) ) {
expected = {
"ajax": true,
"boxSizingReliable": true,
Expand All @@ -161,16 +145,16 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"noCloneChecked": true,
"optDisabled": true,
"optSelected": true,
"pixelPosition": true,
"pixelPosition": false,
"radioValue": true,
"reliableMarginRight": true
};
} else if ( /iphone os/i.test( userAgent ) ) {
} else if ( /android 4\.[0-3]/i.test( userAgent ) ) {
expected = {
"ajax": true,
"boxSizingReliable": true,
"checkClone": true,
"checkOn": true,
"checkClone": false,
"checkOn": false,
"clearCloneStyle": true,
"cors": true,
"focusinBubbles": false,
Expand All @@ -197,22 +181,6 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
"radioValue": true,
"reliableMarginRight": false
};
} else if ( /android 4\.[0-3]/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
};
}

if ( expected ) {
Expand Down

0 comments on commit 43faf6d

Please sign in to comment.