Skip to content

Commit

Permalink
Fix 363299a failures
Browse files Browse the repository at this point in the history
  • Loading branch information
gibson042 committed Feb 7, 2013
1 parent 363299a commit 6971d9d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 0 additions & 3 deletions test/data/selector/sizzle_cache.html
Expand Up @@ -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>
8 changes: 7 additions & 1 deletion 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>
Expand Down
4 changes: 3 additions & 1 deletion test/unit/selector.js
Expand Up @@ -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" );
Expand Down

0 comments on commit 6971d9d

Please sign in to comment.