]> source.dussan.org Git - jquery.git/commitdiff
No ticket. Restore support for Safari 5.1 in test/unit/support.js for now. (cherry...
authorMichał Gołębiowski <m.goleb@gmail.com>
Sat, 7 Sep 2013 00:30:19 +0000 (02:30 +0200)
committerMichał Gołębiowski <m.goleb@gmail.com>
Sat, 7 Sep 2013 00:31:04 +0000 (02:31 +0200)
test/unit/support.js

index eda6a51954b18067965ebd1a86d5ee96f5be9b40..3ee2c8d6b0fe2b0fd90326870b29a59fbfda6314 100644 (file)
@@ -423,10 +423,16 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo
 
 })();
 
-testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Security/CSP) restrictions",
-       "support/csp.php",
-       function( support ) {
-               expect( 1 );
-               deepEqual( jQuery.extend( {}, support ), computedSupport, "No violations of CSP polices" );
-       }
-);
+// Support: Safari 5.1
+// Shameless browser-sniff, but Safari 5.1 mishandles CSP
+if ( !( typeof navigator !== "undefined" &&
+       (/ AppleWebKit\/\d.*? Version\/(\d+)/.exec(navigator.userAgent) || [])[1] < 6 ) ) {
+
+       testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Security/CSP) restrictions",
+               "support/csp.php",
+               function( support ) {
+                       expect( 1 );
+                       deepEqual( jQuery.extend( {}, support ), computedSupport, "No violations of CSP polices" );
+               }
+       );
+}