diff options
author | Michał Gołębiowski <m.goleb@gmail.com> | 2013-09-07 02:30:19 +0200 |
---|---|---|
committer | Michał Gołębiowski <m.goleb@gmail.com> | 2013-09-07 02:31:04 +0200 |
commit | ac0e7a1ba7dca13c46bfd16ddb109c3f5933b4d0 (patch) | |
tree | 6ec9e442568a0958be0a8817efca918a22b1d153 | |
parent | be1e4eee602b64c654197276aa3edd77d0a35c6d (diff) | |
download | jquery-ac0e7a1ba7dca13c46bfd16ddb109c3f5933b4d0.tar.gz jquery-ac0e7a1ba7dca13c46bfd16ddb109c3f5933b4d0.zip |
No ticket. Restore support for Safari 5.1 in test/unit/support.js for now. (cherry-picked from badcd1b6f301e6253405f17759c1270549a34e12)
-rw-r--r-- | test/unit/support.js | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/test/unit/support.js b/test/unit/support.js index eda6a5195..3ee2c8d6b 100644 --- a/test/unit/support.js +++ b/test/unit/support.js @@ -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" ); + } + ); +} |