]> 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:08:25 +0000 (21:08 +0100)
committerMichał Gołębiowski <m.goleb@gmail.com>
Tue, 9 Dec 2014 20:10:31 +0000 (21:10 +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.

(refs 43faf6d1f922ba44a84c93f4ff2461d208b2bf48)

test/unit/support.js

index 73f104098c1666e2e035add49c15ecf3956f4350..12f2c6421e714b497fdc45db714439bf6cb14c2b 100644 (file)
@@ -99,36 +99,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
                        "style": true,
                        "submitBubbles": true
                };
-       } else if ( /trident\/7\.0/i.test( userAgent ) ) {
-               expected = {
-                       "ajax": true,
-                       "boxSizingReliable": false,
-                       "changeBubbles": true,
-                       "checkClone": true,
-                       "checkOn": true,
-                       "clearCloneStyle": false,
-                       "cors": true,
-                       "cssFloat": true,
-                       "deleteExpando": true,
-                       "focusinBubbles": true,
-                       "html5Clone": true,
-                       "htmlSerialize": true,
-                       "input": true,
-                       "leadingWhitespace": true,
-                       "noCloneChecked": false,
-                       "noCloneEvent": true,
-                       "opacity": true,
-                       "optDisabled": true,
-                       "optSelected": false,
-                       "ownLast": false,
-                       "pixelPosition": true,
-                       "radioValue": false,
-                       "reliableHiddenOffsets": true,
-                       "reliableMarginRight": true,
-                       "style": true,
-                       "submitBubbles": 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,
@@ -215,7 +186,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
                        "style": false,
                        "submitBubbles": false
                };
-       } 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,
@@ -244,7 +215,7 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
                        "style": true,
                        "submitBubbles": true
                };
-       } else if ( /6\.0(\.\d+|) safari/i.test( userAgent ) ) {
+       } else if ( /firefox/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
                        "boxSizingReliable": true,
@@ -266,14 +237,14 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
                        "optDisabled": true,
                        "optSelected": true,
                        "ownLast": false,
-                       "pixelPosition": false,
+                       "pixelPosition": true,
                        "radioValue": true,
                        "reliableHiddenOffsets": true,
                        "reliableMarginRight": true,
                        "style": true,
                        "submitBubbles": true
                };
-       } else if ( /firefox/i.test( userAgent ) ) {
+       } else if ( /iphone os/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
                        "boxSizingReliable": true,
@@ -295,20 +266,20 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
                        "optDisabled": true,
                        "optSelected": true,
                        "ownLast": false,
-                       "pixelPosition": true,
+                       "pixelPosition": false,
                        "radioValue": true,
                        "reliableHiddenOffsets": true,
                        "reliableMarginRight": true,
                        "style": true,
                        "submitBubbles": true
                };
-       } else if ( /iphone os/i.test( userAgent ) ) {
+       } else if ( /android 4\.[0-3]/i.test( userAgent ) ) {
                expected = {
                        "ajax": true,
                        "boxSizingReliable": true,
                        "changeBubbles": true,
-                       "checkClone": true,
-                       "checkOn": true,
+                       "checkClone": false,
+                       "checkOn": false,
                        "clearCloneStyle": true,
                        "cors": true,
                        "cssFloat": true,
@@ -360,35 +331,6 @@ testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Sec
                        "style": true,
                        "submitBubbles": true
                };
-       } else if ( /android 4\.[0-3]/i.test( userAgent ) ) {
-               expected = {
-                       "ajax": true,
-                       "boxSizingReliable": true,
-                       "changeBubbles": true,
-                       "checkClone": false,
-                       "checkOn": false,
-                       "clearCloneStyle": true,
-                       "cors": true,
-                       "cssFloat": true,
-                       "deleteExpando": true,
-                       "focusinBubbles": false,
-                       "html5Clone": true,
-                       "htmlSerialize": true,
-                       "input": true,
-                       "leadingWhitespace": true,
-                       "noCloneChecked": true,
-                       "noCloneEvent": true,
-                       "opacity": true,
-                       "optDisabled": true,
-                       "optSelected": true,
-                       "ownLast": false,
-                       "pixelPosition": false,
-                       "radioValue": true,
-                       "reliableHiddenOffsets": true,
-                       "reliableMarginRight": true,
-                       "style": true,
-                       "submitBubbles": true
-               };
        }
 
        if ( expected ) {