aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/support.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/support.js')
-rw-r--r--test/unit/support.js32
1 files changed, 14 insertions, 18 deletions
diff --git a/test/unit/support.js b/test/unit/support.js
index 60a658261..4c6a49d55 100644
--- a/test/unit/support.js
+++ b/test/unit/support.js
@@ -18,33 +18,18 @@ test( "zoom of doom (#13089)", function() {
if ( jQuery.css ) {
testIframeWithCallback( "body background is not lost if set prior to loading jQuery (#9239)", "support/bodyBackground.html", function( color, support ) {
expect( 2 );
- var i,
- passed = true,
- okValue = {
+ var okValue = {
"#000000": true,
"rgb(0, 0, 0)": true
};
ok( okValue[ color ], "color was not reset (" + color + ")" );
- for ( i in jQuery.support ) {
- if ( jQuery.support[ i ] !== support[ i ] ) {
- passed = false;
- strictEqual( jQuery.support[ i ], support[ i ], "Support property " + i + " is different" );
- }
- }
- for ( i in support ) {
- if ( !( i in jQuery.support ) ) {
- passed = false;
- strictEqual( jQuery.support[ i ], support[ i ], "Unexpected property: " + i );
- }
- }
-
- ok( passed, "Same support properties" );
+ deepEqual( jQuery.extend( {}, support ), jQuery.support, "Same support properties" );
});
}
testIframeWithCallback( "A background on the testElement does not cause IE8 to crash (#9823)", "support/testElementCrash.html", function() {
- expect(1);
+ expect( 1 );
ok( true, "IE8 does not crash" );
});
@@ -382,3 +367,14 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo
}
})();
+
+// 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" );
+ });
+}