]> source.dussan.org Git - jquery.git/commitdiff
No ticket. Restore support for Safari 5.1 in test/unit/support.js for now.
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:30:19 +0000 (02:30 +0200)
test/unit/support.js

index fda26870b6da95bfaa19a81a3c11beccd56601da..2b029ed1e0228e221e60698d8cd8b832d110327e 100644 (file)
@@ -158,10 +158,16 @@ if ( jQuery.css ) {
 
 })();
 
-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" );
+               }
+       );
+}