]> source.dussan.org Git - jquery.git/commitdiff
Support: Re-organize browser order, add Safari 8
authorMichał Gołębiowski <m.goleb@gmail.com>
Tue, 9 Dec 2014 20:05:31 +0000 (21:05 +0100)
committerMichał Gołębiowski <m.goleb@gmail.com>
Tue, 9 Dec 2014 20:05:45 +0000 (21:05 +0100)
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.

test/unit/support.js

index 80ce287d80993c9e67b5c247b6751cbb353a9896..11f15a33b4ce87dc39bb5a45ca862060322308ae 100644 (file)
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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,
@@ -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 ) {