aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2013-02-07 23:43:21 -0500
committerRichard Gibson <richard.gibson@gmail.com>2013-02-07 23:43:21 -0500
commitdc9b009c1325e05344fa2216fac71fac3a0a0590 (patch)
tree303c569c6a333c6c86c621a59d1e7b56363af5ee
parent6971d9d8e2b88d008884e0758c94c528dc97238c (diff)
downloadjquery-dc9b009c1325e05344fa2216fac71fac3a0a0590.tar.gz
jquery-dc9b009c1325e05344fa2216fac71fac3a0a0590.zip
Fix 363299ac failures: protect Safari 5.1 from CSP
-rw-r--r--test/unit/support.js14
1 files changed, 10 insertions, 4 deletions
diff --git a/test/unit/support.js b/test/unit/support.js
index 93f7a76d7..83a50f446 100644
--- a/test/unit/support.js
+++ b/test/unit/support.js
@@ -29,7 +29,13 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo
strictEqual( shrinkWrapBlocks, jQuery.support.shrinkWrapBlocks, "jQuery.support.shrinkWrapBlocks properties are the same" );
});
-testIframeWithCallback( "Check CSP (https://developer.mozilla.org/en-US/docs/Security/CSP) restrictions", "support/csp.php", function( support ) {
- expect( 1 );
- deepEqual( jQuery.extend( {}, support ), jQuery.support, "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 ), jQuery.support, "No violations of CSP polices" );
+ });
+}