]> source.dussan.org Git - jquery.git/commitdiff
Fix 363299ac failures
authorRichard Gibson <richard.gibson@gmail.com>
Thu, 7 Feb 2013 22:03:04 +0000 (17:03 -0500)
committerRichard Gibson <richard.gibson@gmail.com>
Thu, 7 Feb 2013 22:03:04 +0000 (17:03 -0500)
test/data/selector/sizzle_cache.html
test/data/support/csp.php
test/unit/selector.js

index f4dc234d662896f846ee390ee71b11cbdcd1ac87..1055c75aea03407cb7dacce769a054d636765b09 100644 (file)
@@ -17,8 +17,5 @@
        <div class="test">
                <a href="#" id="collision">Worlds collide</a>
        </div>
-       <script>
-               window.parent.iframeCallback( $cached, jQuery, document );
-       </script>
 </body>
 </html>
index 9aa029b9cc388a8dfebeb3f8c938826806b0c7e8..f72aa07685693343fcc509fc1335739909099f59 100644 (file)
@@ -1,6 +1,12 @@
 <?php
+       # Support: Firefox
        header("X-Content-Security-Policy: default-src 'self';");
-       header("X-WebKit-CSP: script-src 'self'");
+
+       # Support: Webkit, Safari 5
+       # http://stackoverflow.com/questions/13663302/why-does-my-content-security-policy-work-everywhere-but-safari
+       header("X-WebKit-CSP: script-src " . $_SERVER["HTTP_HOST"] . " 'self'");
+
+       header("Content-Security-Policy: default-src 'self'");
 ?>
 <!DOCTYPE html>
 <html>
index 8338b1d343c20cddd11d84c96c59e3b66222831d..22d7305eb077809ec4c51b03d58a9b1b23c64643 100644 (file)
@@ -175,7 +175,9 @@ testIframe("selector/html5_selector", "attributes - jQuery.attr", function( jQue
        t( "Improperly named form elements do not interfere with form selections (#9570)", "form[name='formName']", ["form1"] );
 });
 
-testIframeWithCallback("Sizzle cache collides with multiple Sizzles on a page", "selector/sizzle_cache.html", function( $cached, jQuery, document ) {
+testIframe("selector/sizzle_cache", "Sizzle cache collides with multiple Sizzles on a page", function( jQuery, window, document ) {
+       var $cached = window["$cached"];
+
        expect(4);
        notStrictEqual( jQuery, $cached, "Loaded two engines" );
        deepEqual( $cached(".test a").get(), [ document.getElementById("collision") ], "Select collision anchor with first sizzle" );