]> source.dussan.org Git - jquery.git/commitdiff
Ref #13316: Sync all documents on full vs. minified source. Close gh-1147.
authorRichard Gibson <richard.gibson@gmail.com>
Mon, 28 Jan 2013 04:34:38 +0000 (23:34 -0500)
committerRichard Gibson <richard.gibson@gmail.com>
Thu, 7 Feb 2013 20:16:28 +0000 (15:16 -0500)
36 files changed:
src/support.js
test/csp.php [deleted file]
test/data/ajax/unreleasedXHR.html
test/data/core/cc_on.html
test/data/dimensions/documentLarge.html
test/data/dimensions/documentSmall.html
test/data/event/onbeforeunload.html [new file with mode: 0644]
test/data/event/promiseReady.html
test/data/event/syncReady.html
test/data/manipulation/iframe-denied.html
test/data/offset/absolute.html
test/data/offset/body.html
test/data/offset/fixed.html
test/data/offset/relative.html
test/data/offset/scroll.html
test/data/offset/static.html
test/data/offset/table.html
test/data/onbeforeunload.html [deleted file]
test/data/selector/html5_selector.html
test/data/selector/sizzle_cache.html
test/data/support/bodyBackground.html
test/data/support/csp.js [new file with mode: 0644]
test/data/support/csp.php [new file with mode: 0644]
test/data/support/shrinkWrapBlocks.html
test/data/support/testElementCrash.html
test/delegatetest.html
test/hovertest.html
test/index.html
test/jquery.js [new file with mode: 0644]
test/localfile.html
test/networkerror.html
test/polluted.php [deleted file]
test/readywait.html
test/unit/event.js
test/unit/selector.js
test/unit/support.js

index 35fb876126c9dba4b46c8a7d86c942cf8da86fe7..166f50896975f3a4e0b548f3a16f42585fcca36e 100644 (file)
@@ -60,7 +60,7 @@ jQuery.support = (function() {
        support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
 
        // Support: Firefox 17+
-       // 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)
        div.setAttribute( "onfocusin", "t" );
        support.focusinBubbles = "onfocusin" in window || div.attributes.onfocusin.expando === false;
 
diff --git a/test/csp.php b/test/csp.php
deleted file mode 100644 (file)
index 9ab18f3..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<?php
-       header("X-Content-Security-Policy: default-src localhost 'self';");
-       header("X-WebKit-CSP: script-src 'self'; style-src 'self' 'unsafe-inline'");
-?>
-<!DOCTYPE html>
-<html>
-<head>
-       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-       <title>CSP Test Page</title>
-
-       <script src="../dist/jquery.js"></script>
-</head>
-<body>
-       <p>CSP Test Page</p>
-</body>
-</html>
index 6c3d8210b1e71935a62f34fd8a2983584141f173..5233354f57899011f6f37c4f3859cbfdb5c2d79d 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="content-type" content="text/html; charset=utf-8">
 <title>Attempt to block tests because of dangling XHR requests (IE)</title>
-<script type="text/javascript" src="../../../dist/jquery.min.js"></script>
+<script src="../../jquery.js"></script>
 <script type="text/javascript">
 window.onunload = function() {};
 jQuery(function() {
index 88bb01029a4e6f2663b79f458e76ec7dcb77fefc..131e2e8532eabee21829ce64ded30e3ff188745c 100644 (file)
@@ -12,7 +12,7 @@
                        errors.push( errorMessage );
                };
        </script>
-       <script src="../../../dist/jquery.min.js"></script>
+       <script src="../../jquery.js"></script>
 </head>
 <body>
        <script>
index 2b5506c10e899104ce8056f46957205969938607..a6598fcc86b19042548c948bb417f33ac45d632c 100644 (file)
@@ -11,7 +11,7 @@
 </head>
 <body>
        <div>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
        </div>
 </body>
 </html>
index 12cbf93855953c4ac4684c03fe958fb4a5f37f21..63e1c2a8ffce8e32c6fc13d25f17bbe0f09a7f63 100644 (file)
@@ -15,7 +15,7 @@
 </head>
 <body>
        <div>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
        </div>
 </body>
 </html>
diff --git a/test/data/event/onbeforeunload.html b/test/data/event/onbeforeunload.html
new file mode 100644 (file)
index 0000000..11ad196
--- /dev/null
@@ -0,0 +1,20 @@
+<!doctype html>
+<html>
+       <script src="../../jquery.js"></script>
+       <script>
+               function report( event ) {
+                       var payload = {
+                               event: event.type
+                       };
+                       return parent.postMessage( JSON.stringify(payload), "*" );
+               }
+
+               jQuery( window ).on( "beforeunload", function( event ) {
+                       report( event );
+               }).on( "load", function( event ) {
+                       setTimeout(function() {
+                               window.location.reload();
+                       }, 50);
+               });
+       </script>
+</html>
index d2b166f32201f8aadc9ee1172a4c1da1e6a8b379..17b6e7f2c6e6277b6663ab5e2e3608f9517156bf 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="content-type" content="text/html; charset=utf-8">
 <title>Test case for jQuery ticket #11470</title>
-<script type="text/javascript" src="../../../dist/jquery.min.js"></script>
+<script src="../../jquery.js"></script>
 <script type="text/javascript">
 jQuery.when( jQuery.ready ).done(function() {
        jQuery("body").append("<div>modifying DOM</div>");
index 6c2fc0e96bb9e7f283fed520579adc8748726455..e0885707edab0acb6ea4853de1dabeda43c5bce3 100644 (file)
@@ -3,7 +3,7 @@
 <head>
 <meta http-equiv="content-type" content="text/html; charset=utf-8">
 <title>Test case for jQuery ticket #10067</title>
-<script type="text/javascript" src="../../../dist/jquery.min.js"></script>
+<script src="../../jquery.js"></script>
 </head>
 <body>
 
index 28a53057594423d0e39384f99f3b4f75a5ed1d28..14df26a69be2b8ab6a0a8eddcacd99bea1257c84 100644 (file)
@@ -6,7 +6,7 @@
        </head>
        <body>
                <div id="qunit-fixture"></div>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
                <script>
                        var script = document.getElementsByTagName( "script" )[ 0 ],
                                div = document.createElement( "div" ),
index 7c35ee3b74ca1b17e8ed138258ec0343b50f30ec..7665d7aac5adb591e3caface2ac74323fa89ed95 100644 (file)
@@ -15,7 +15,7 @@
                        p.instructions { position: absolute; bottom: 0; }
                        #positionTest { position: absolute; }
                </style>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
                <script type="text/javascript" charset="utf-8">
                        jQuery(function($) {
                                $('.absolute').click(function() {
index dd3193f9170a4df0b6da0d8e25e0932bbb15afb5..6dc3d3754fab62e77f0e0970a0000a5bea7a9231 100644 (file)
@@ -9,7 +9,7 @@
                        #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
                        #firstElement { width: 50px; height: 50px; background: green; }
                </style>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
                <script type="text/javascript" charset="utf-8">
                        jQuery(function($) {
                                $('body').click(function() {
index 1b35f5d358d8a1fd83157cb585a490a898232718..7564f085e53a9f63528cd859827e51db4dd5de90 100644 (file)
@@ -12,7 +12,7 @@
                        #forceScroll { width: 5000px; height: 5000px; }
                        #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
                </style>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
                <script type="text/javascript" charset="utf-8">
                        jQuery(function($) {
                                window.scrollTo(1000,1000);
index 91b6cbbc5bd530f9898bf976aec5b7516d0f86f3..3ac054837aea328dd81b53522cd337c47a9e40e9 100644 (file)
@@ -10,7 +10,7 @@
                        #relative-2 { top: 20px; left: 20px; }
                        #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
                </style>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
                <script type="text/javascript" charset="utf-8">
                        jQuery(function($) {
                                $('.relative').click(function() {
index f8c638494cb3c8aab6073b87aa6d45c42530ab27..113400ce40b6b85ba72bf33d57bf24d055bd7f9d 100644 (file)
@@ -13,7 +13,7 @@
                        #forceScroll { width: 5000px; height: 5000px; }
                        #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
                </style>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
                <script type="text/javascript" charset="utf-8">
                        jQuery(function($) {
                                window.scrollTo(1000,1000);
index cf1a9a9807b4ce5e5fd32de3881ef6944002af2e..1e6ab7c4c0e178c25f0e52a5d5091df783d9df5a 100644 (file)
@@ -10,7 +10,7 @@
                        #static-2 { top: 20px; left: 20px; }
                        #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
                </style>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
                <script type="text/javascript" charset="utf-8">
                        jQuery(function($) {
                                $('.static').click(function() {
index e8e431a8a7ce23493a93a62c82d2e6b02c9075dd..5510e2b9b36037fb00358730a76964ae6568a321 100644 (file)
@@ -10,7 +10,7 @@
                        th, td { border: 1px solid #000; width: 100px; height: 100px; }
                        #marker { position: absolute; border: 2px solid #000; width: 50px; height: 50px; background: #ccc; }
                </style>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
                <script type="text/javascript" charset="utf-8">
                        jQuery(function($) {
                                $('table, th, td').click(function() {
diff --git a/test/data/onbeforeunload.html b/test/data/onbeforeunload.html
deleted file mode 100644 (file)
index ad3a1ca..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-<!doctype html>
-<html>
-       <script src="/dist/jquery.js"></script>
-       <script>
-               function report( event ) {
-                       var payload = {
-                               event: event.type
-                       };
-                       return parent.postMessage( JSON.stringify(payload), "*" );
-               }
-
-               jQuery( window ).on( "beforeunload", function( event ) {
-                       report( event );
-               }).on( "load", function( event ) {
-                       setTimeout(function() {
-                               window.location.reload();
-                       }, 50);
-               });
-       </script>
-</html>
index 2124a6eb3bdd4cfa47db28c167795e74d33428c4..30f25c9d5ac8f1777635e90a7b18cccbce413572 100644 (file)
@@ -4,7 +4,7 @@
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <title>jQuery selector - attributes</title>
 
-       <script src="../../../dist/jquery.min.js"></script>
+       <script src="../../jquery.js"></script>
 
        <script id="script1"
                        defer
index 0c81b98262d7e2daf5b2bc8d0ccc9f17a77f3e2e..f4dc234d662896f846ee390ee71b11cbdcd1ac87 100644 (file)
@@ -4,18 +4,21 @@
        <meta http-equiv="Content-type" content="text/html; charset=utf-8">
        <title>jQuery selector - sizzle cache</title>
 
-       <script src="../../../dist/jquery.js"></script>
+       <script src="../../jquery.js"></script>
        <script>
-               var $cached = jQuery.noConflict(true);
+               document.write(
+                       "<script>var $cached = jQuery.noConflict(true);<\x2Fscript>" +
+                       "<script src='" + document.getElementById("jquery-js").src + "?overwrite'><\x2Fscript>"
+               );
        </script>
-       <script src="../../../dist/jquery.min.js"></script>
 
 </head>
 <body>
-
        <div class="test">
                <a href="#" id="collision">Worlds collide</a>
        </div>
-
+       <script>
+               window.parent.iframeCallback( $cached, jQuery, document );
+       </script>
 </body>
 </html>
index b0abc074fe2c4c32bd27a19e9d2a34e432e12435..8991007cf7c8c02e990bbc3895ff51c0f7bd3598 100644 (file)
@@ -17,7 +17,7 @@
 </head>
 <body>
        <div>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
        </div>
        <script>
                jQuery(function() {
diff --git a/test/data/support/csp.js b/test/data/support/csp.js
new file mode 100644 (file)
index 0000000..8bce34f
--- /dev/null
@@ -0,0 +1,3 @@
+jQuery(function() {
+       parent.iframeCallback( jQuery.support );
+});
diff --git a/test/data/support/csp.php b/test/data/support/csp.php
new file mode 100644 (file)
index 0000000..9aa029b
--- /dev/null
@@ -0,0 +1,16 @@
+<?php
+       header("X-Content-Security-Policy: default-src 'self';");
+       header("X-WebKit-CSP: script-src 'self'");
+?>
+<!DOCTYPE html>
+<html>
+<head>
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+       <title>CSP Test Page</title>
+       <script src="../../jquery.js"></script>
+       <script src="csp.js"></script>
+</head>
+<body>
+       <p>CSP Test Page</p>
+</body>
+</html>
index 1ae15bfb5677375b5d2607490be03a4ae8813a5f..a2097cb21c5cbf395b7b395dc8b295ef216e3583 100644 (file)
@@ -12,7 +12,7 @@
 </head>
 <body>
        <div>
-               <script src="../../../dist/jquery.min.js"></script>
+               <script src="../../jquery.js"></script>
        </div>
        <script>
                jQuery(function() {
index f5bc1b3ddde0e78f9e4788b9c693cdebaa7d71de..16de48ce131b49d49d40b2e9d92c9555be4d4541 100644 (file)
@@ -7,7 +7,7 @@
                        background: url('../1x1.jpg');
                }
        </style>
-       <script src="../../../dist/jquery.min.js"></script>
+       <script src="../../jquery.js"></script>
 </head>
 <body>
        <script>
index db773ef9e1f9fa591e8e14129b4996245ae687f8..119b63a73124f14940b2519dd4bbe4f4880241e9 100644 (file)
@@ -2,7 +2,7 @@
 <html>
 <head>
 <title>Event Delegation Tests</title>
-<script src="../dist/jquery.min.js"></script>
+<script src="jquery.js"></script>
 <style>
 table {
        border-collapse: collapse;
index 151398fb18a40d6349d7e8a8d37605a2dd7f025c..8e45784c4e1c9e519c22d0ecc9a6dc63456529f7 100644 (file)
@@ -1,7 +1,7 @@
 <html>
 <head>
 <title>Hover tests</title>
-<script src="../dist/jquery.min.js"></script>
+<script src="jquery.js"></script>
 <style>
 /* Remove body dimensions so we can test enter/leave to surrounding browser chrome */
 body, html {
index f073054d8f66ff5725b261635bfb7b5c09ec0cd2..62ccfe12e9479c2fd42e7ae49fb3decafb68aaa6 100644 (file)
@@ -41,7 +41,7 @@
                        }
 
                        // Load jQuery
-                       document.write( "<script src='" + src + "'><\/script>" );
+                       document.write( "<script id='jquery-js' src='" + src + "'><\x2Fscript>" );
                })();
        </script>
        <script src="data/testrunner.js"></script>
diff --git a/test/jquery.js b/test/jquery.js
new file mode 100644 (file)
index 0000000..93d1095
--- /dev/null
@@ -0,0 +1,5 @@
+// Use the right jQuery source in iframe tests
+document.write( "<script id='jquery-js' src='" +
+       parent.document.getElementById("jquery-js").src.replace( /^(?![^\/?#]+:)/,
+               parent.location.pathname.replace( /[^\/]$/, "$0/" ) ) +
+"'><\x2Fscript>" );
index 8d3fb34a80513f7af0b23fc03f2ce3f09cd0ba65..fbafe02cccdb52af14fc5fda8a518c99d41a16e2 100644 (file)
@@ -4,7 +4,7 @@
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>jQuery Local File Test</title>
        <!-- Includes -->
-       <script src="../dist/jquery.min.js"></script>
+       <script src="jquery.js"></script>
        <style>
                .error { color: red; }
                .success { color: green; }
index 587786610419787f61a675337219b551383f27fa..99b4ded51739fc1a88b0dd1ad91eee45c2c6fd53 100644 (file)
@@ -15,7 +15,7 @@
        <style>
                div { margin-top: 10px; }
        </style>
-       <script src="../dist/jquery.min.js"></script>
+       <script src="jquery.js"></script>
        <script type="text/javascript">
        $('button').live('click', function () {
                $.ajax({
diff --git a/test/polluted.php b/test/polluted.php
deleted file mode 100644 (file)
index 31a77c3..0000000
+++ /dev/null
@@ -1,110 +0,0 @@
-<?php
-       $baseURL = "http://ajax.googleapis.com/ajax/libs/";
-       $libraries = array(
-               "Dojo" => array(
-                       "versions" => array( "1.1.1", "1.2.0", "1.2.3", "1.3.0", "1.3.1", "1.3.2", "1.4.0", "1.4.1", "1.4.3", "1.5.0" ),
-                       "url" => "dojo/XYZ/dojo/dojo.xd.js"
-               ),
-               "ExtCore" => array(
-                       "versions" => array( "3.0.0", "3.1.0" ),
-                       "url" => "ext-core/XYZ/ext-core.js"
-               ),
-               "jQuery" => array(
-                       "versions" => array( "1.2.3", "1.2.6", "1.3.0", "1.3.1", "1.3.2", "1.4.0", "1.4.1", "1.4.2", "1.4.3", "1.4.4", "1.5.0" ),
-                       "url" => "jquery/XYZ/jquery.min.js"
-               ),
-               "jQueryUI" => array(
-                       "versions" => array( "1.5.2", "1.5.3", "1.6.0", "1.7.0", "1.7.1", "1.7.2", "1.7.3", "1.8.0", "1.8.1", "1.8.2", "1.8.4", "1.8.5", "1.8.6", "1.8.7", "1.8.8", "1.8.9" ),
-                       "url" => "jqueryui/XYZ/jquery-ui.min.js"
-               ),
-               "MooTools" => array(
-                       "versions" => array( "1.1.1", "1.1.2", "1.2.1", "1.2.2", "1.2.3", "1.2.4", "1.2.5", "1.3.0" ),
-                       "url" => "mootools/XYZ/mootools-yui-compressed.js"
-               ),
-               "Prototype" => array(
-                       "versions" => array( "1.6.0.2", "1.6.0.3", "1.6.1.0", "1.7.0.0" ),
-                       "url" => "prototype/XYZ/prototype.js"
-               ),
-               "scriptaculous" => array(
-                       "versions" => array( "1.8.1", "1.8.2", "1.8.3" ),
-                       "url" => "scriptaculous/XYZ/scriptaculous.js"
-               ),
-               "SWFObject" => array(
-                       "versions" => array( "2.1", "2.2" ),
-                       "url" => "swfobject/XYZ/swfobject.js"
-               ),
-               "YUI" => array(
-                       "versions" => array( "2.6.0", "2.7.0", "2.8.0r4", "2.8.1", "2.8.2", "3.3.0" ),
-                       "url" =>    "yui/XYZ/build/yui/yui-min.js"
-               )
-       );
-
-       if( count($_POST) ) {
-               $includes = array();
-               foreach( $_POST as $name => $ver ){
-                       if ( empty( $libraries[ $name ] )) {
-                               echo "unsupported library ". $name;
-                               exit;
-                       }
-               
-                       $url = $libraries[ $name ][ "url" ];
-                       if( $name == "YUI" && $ver[0] == "2" ) {
-                               $url = str_replace( "/yui", "/yuiloader", $url);
-                       }
-                       
-                       if ( empty( $libraries[ $name ][ "versions" ][ $ver ] )) {
-                               echo "library ". $name ." not supported in version ". $ver;
-                               exit;
-                       }
-                       
-                       $include = "<script src='$baseURL".str_replace("XYZ", $ver, $url)."'></script>\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 -->", $includes, $suite );
-               exit;
-       }
-?>
-<!DOCTYPE html>
-<html>
-<head>
-       <meta http-equiv="content-type" content="text/html; charset=UTF-8">
-       <title>Run jQuery Test Suite Polluted</title>
-       <style type="text/css">
-               .otherlibs fieldset {
-                       width: 400px
-               }
-               .otherlibs label{
-                       margin: 5px 0px 5px 20px;
-               }
-       </style>
-</head>
-
-<body id="body">
-       <h1 id="header">jQuery Test Suite</h1>
-       <h2 id="banner" class="fail"></h2>
-       <h2 id="userAgent">Choose other libraries to include</h2>
-
-       <form class="otherlibs" action="./polluted.php" method="POST">
-               <?php
-                       foreach( $libraries as $name => $data ) {
-                               echo "<fieldset><legend>$name</legend>";
-                               $i = 0;
-                               foreach( $data[ "versions" ] as $ver ) {
-                                       $i++;
-                                       echo "<label><input type='radio' name='$name' value='$ver' />$ver</label>";
-                                       if( !($i % 4) ) echo "<br />";
-                               }
-                               echo "</fieldset>";
-                       }
-               ?>
-               <input type="submit" value=" Run " class="submit" />
-       </form>
-</body>
-</html>
index 4738b1b9529a6ddff9b9ea7ee3183c185bf13029..7a736bef5a3b84f826ca13d0338ac3c30a6fc21b 100644 (file)
@@ -14,7 +14,7 @@
                #output { background-color: green }
                #expectedOutput { background-color: green }
        </style>
-       <script src="../dist/jquery.min.js"></script>
+       <script src="jquery.js"></script>
 
        <!-- Load the script loader that uses
                jQuery.readyWait -->
index c72d873f01bdff934940683360ebca43f4c47094..f5dd149a35ec30eacce190befbb37506a4492a94 100644 (file)
@@ -1372,7 +1372,7 @@ test("Submit event can be stopped (#11049)", function() {
 // Test beforeunload event only if it supported (i.e. not Opera)
 if ( window.onbeforeunload === null ) {
        asyncTest("on(beforeunload)", 1, function() {
-               var iframe = jQuery(jQuery.parseHTML("<iframe src='data/onbeforeunload.html'><iframe>"));
+               var iframe = jQuery(jQuery.parseHTML("<iframe src='data/event/onbeforeunload.html'><iframe>"));
 
                window.onmessage = function( event ) {
                        var payload = JSON.parse( event.data );
index 07e563da3af7edc709173a4c82a5e264c9ec05c2..8338b1d343c20cddd11d84c96c59e3b66222831d 100644 (file)
@@ -175,10 +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"] );
 });
 
-testIframe("selector/sizzle_cache", "Sizzle cache collides with multiple Sizzles on a page", function( jQuery, window, document ) {
-       var $cached = window["$cached"];
-
-       expect(3);
+testIframeWithCallback("Sizzle cache collides with multiple Sizzles on a page", "selector/sizzle_cache.html", function( $cached, jQuery, document ) {
+       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" );
index 09c6ad1a58f8217b38a023187040fa0874ec8361..93f7a76d74f39d98a8be9b3a197c02ab7950f19b 100644 (file)
@@ -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" );
+});