Skip to content
Permalink
Browse files

Fix 363299a failures: protect Safari 5.1 from CSP

  • Loading branch information...
gibson042 committed Feb 8, 2013
1 parent 6971d9d commit dc9b009c1325e05344fa2216fac71fac3a0a0590
Showing with 10 additions and 4 deletions.
  1. +10 −4 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" );
});
}

0 comments on commit dc9b009

Please sign in to comment.
You can’t perform that action at this time.