diff options
author | Richard Gibson <richard.gibson@gmail.com> | 2013-01-27 23:34:38 -0500 |
---|---|---|
committer | Richard Gibson <richard.gibson@gmail.com> | 2013-02-07 15:16:28 -0500 |
commit | 363299ac24aebbf2445207621840f44fcaaf670a (patch) | |
tree | 50f8e3041341118cb713e780a5cfa97853a6af89 /test/unit/support.js | |
parent | f3db084f7cc73379b0d6f5341c987e2a801ea032 (diff) | |
download | jquery-363299ac24aebbf2445207621840f44fcaaf670a.tar.gz jquery-363299ac24aebbf2445207621840f44fcaaf670a.zip |
Ref #13316: Sync all documents on full vs. minified source. Close gh-1147.
Diffstat (limited to 'test/unit/support.js')
-rw-r--r-- | test/unit/support.js | 26 |
1 files changed, 8 insertions, 18 deletions
diff --git a/test/unit/support.js b/test/unit/support.js index 09c6ad1a5..93f7a76d7 100644 --- a/test/unit/support.js +++ b/test/unit/support.js @@ -9,33 +9,18 @@ test("boxModel", 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" ); }); @@ -43,3 +28,8 @@ testIframeWithCallback( "box-sizing does not affect jQuery.support.shrinkWrapBlo expect( 1 ); 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" ); +}); |