aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Gibson <richard.gibson@gmail.com>2013-02-07 17:03:04 -0500
committerRichard Gibson <richard.gibson@gmail.com>2013-02-07 17:03:04 -0500
commit6971d9d8e2b88d008884e0758c94c528dc97238c (patch)
treec31a2392a43d4027dbb517d53a68f240c6441269 /test
parent363299ac24aebbf2445207621840f44fcaaf670a (diff)
downloadjquery-6971d9d8e2b88d008884e0758c94c528dc97238c.tar.gz
jquery-6971d9d8e2b88d008884e0758c94c528dc97238c.zip
Fix 363299ac failures
Diffstat (limited to 'test')
-rw-r--r--test/data/selector/sizzle_cache.html3
-rw-r--r--test/data/support/csp.php8
-rw-r--r--test/unit/selector.js4
3 files changed, 10 insertions, 5 deletions
diff --git a/test/data/selector/sizzle_cache.html b/test/data/selector/sizzle_cache.html
index f4dc234d6..1055c75ae 100644
--- a/test/data/selector/sizzle_cache.html
+++ b/test/data/selector/sizzle_cache.html
@@ -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>
diff --git a/test/data/support/csp.php b/test/data/support/csp.php
index 9aa029b9c..f72aa0768 100644
--- a/test/data/support/csp.php
+++ b/test/data/support/csp.php
@@ -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>
diff --git a/test/unit/selector.js b/test/unit/selector.js
index 8338b1d34..22d7305eb 100644
--- a/test/unit/selector.js
+++ b/test/unit/selector.js
@@ -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" );