From: Richard Gibson Date: Fri, 8 Feb 2013 05:20:33 +0000 (-0500) Subject: Ref #13316: Sync all test documents on full vs. minified source. X-Git-Tag: 1.10.0-beta1~84 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=67a2e4eaac98cee79a02a0a45e4826a7958d4b75;p=jquery.git Ref #13316: Sync all test documents on full vs. minified source. --- diff --git a/src/support.js b/src/support.js index d955bf0c1..f677c0963 100644 --- a/src/support.js +++ b/src/support.js @@ -133,7 +133,7 @@ jQuery.support = (function() { } // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) for ( i in { submit: true, change: true, focusin: true }) { div.setAttribute( eventName = "on" + i, "t" ); diff --git a/test/csp.php b/test/csp.php deleted file mode 100644 index 9ab18f392..000000000 --- a/test/csp.php +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - CSP Test Page - - - - -

CSP Test Page

- - diff --git a/test/data/ajax/unreleasedXHR.html b/test/data/ajax/unreleasedXHR.html index 6c3d8210b..5233354f5 100644 --- a/test/data/ajax/unreleasedXHR.html +++ b/test/data/ajax/unreleasedXHR.html @@ -3,7 +3,7 @@ Attempt to block tests because of dangling XHR requests (IE) - + - + + diff --git a/test/data/dimensions/documentSmall.html b/test/data/dimensions/documentSmall.html index 12cbf9385..63e1c2a8f 100644 --- a/test/data/dimensions/documentSmall.html +++ b/test/data/dimensions/documentSmall.html @@ -15,7 +15,7 @@
- +
diff --git a/test/data/event/promiseReady.html b/test/data/event/promiseReady.html index d2b166f32..17b6e7f2c 100644 --- a/test/data/event/promiseReady.html +++ b/test/data/event/promiseReady.html @@ -3,7 +3,7 @@ Test case for jQuery ticket #11470 - + + diff --git a/test/data/manipulation/iframe-denied.html b/test/data/manipulation/iframe-denied.html index 28a530575..14df26a69 100644 --- a/test/data/manipulation/iframe-denied.html +++ b/test/data/manipulation/iframe-denied.html @@ -6,7 +6,7 @@
- + + + + + + + + + + - -
Worlds collide
- diff --git a/test/data/support/bodyBackground.html b/test/data/support/bodyBackground.html index b0abc074f..8991007cf 100644 --- a/test/data/support/bodyBackground.html +++ b/test/data/support/bodyBackground.html @@ -17,7 +17,7 @@
- +
+ + + +

CSP Test Page

+ + diff --git a/test/data/support/shrinkWrapBlocks.html b/test/data/support/shrinkWrapBlocks.html index 1ae15bfb5..a2097cb21 100644 --- a/test/data/support/shrinkWrapBlocks.html +++ b/test/data/support/shrinkWrapBlocks.html @@ -12,7 +12,7 @@
- +
+ + - + \n"; - if( $lib == "prototype" ) { // prototype must be included first - array_unshift( $includes, $include ); - } else { - array_push( $includes, $include ); - } - } - - $includes = implode( "\n", $includes ); - $suite = file_get_contents( "index.html" ); - echo str_replace( "", $includes, $suite ); - exit; - } -?> - - - - - Run jQuery Test Suite Polluted - - - - -

jQuery Test Suite

- -

Choose other libraries to include

- -
- $data ) { - echo "
$name"; - $i = 0; - foreach( $data[ "versions" ] as $ver ) { - $i++; - echo ""; - if( !($i % 4) ) echo "
"; - } - echo "
"; - } - ?> - -
- - diff --git a/test/readywait.html b/test/readywait.html index 4738b1b95..7a736bef5 100644 --- a/test/readywait.html +++ b/test/readywait.html @@ -14,7 +14,7 @@ #output { background-color: green } #expectedOutput { background-color: green } - + diff --git a/test/unit/selector.js b/test/unit/selector.js index 07e563da3..22d7305eb 100644 --- a/test/unit/selector.js +++ b/test/unit/selector.js @@ -178,7 +178,8 @@ testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQue testIframe("selector/sizzle_cache", "Sizzle cache collides with multiple Sizzles on a page", function( jQuery, window, document ) { var $cached = window["$cached"]; - expect(3); + expect(4); + notStrictEqual( jQuery, $cached, "Loaded two engines" ); deepEqual( $cached(".test a").get(), [ document.getElementById("collision") ], "Select collision anchor with first sizzle" ); equal( jQuery(".evil a").length, 0, "Select nothing with second sizzle" ); equal( jQuery(".evil a").length, 0, "Select nothing again with second sizzle" ); 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" ); + }); +}